aboutsummaryrefslogtreecommitdiffstats
path: root/ui/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/util.c')
-rw-r--r--ui/util.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/util.c b/ui/util.c
index 03b581816e..e7cd1bcadb 100644
--- a/ui/util.c
+++ b/ui/util.c
@@ -53,9 +53,6 @@ get_args_as_string(int argc, char **argv, int optindex)
int i;
char *argstring;
- /* We don't allow a null-list call */
- g_assert(argc - optindex > 0);
-
/*
* Find out how long the string will be.
*/
@@ -66,6 +63,12 @@ get_args_as_string(int argc, char **argv, int optindex)
}
/*
+ * If no arguments, return empty string
+ */
+ if (len == 0)
+ return g_strdup("");
+
+ /*
* Allocate the buffer for the string.
*/
argstring = (char *)g_malloc(len);