diff options
Diffstat (limited to 'ui/util.c')
-rw-r--r-- | ui/util.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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); |