summaryrefslogtreecommitdiff
path: root/src/core/special-vars.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/special-vars.c')
-rw-r--r--src/core/special-vars.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/special-vars.c b/src/core/special-vars.c
index 4f68bc53..196a2cae 100644
--- a/src/core/special-vars.c
+++ b/src/core/special-vars.c
@@ -46,7 +46,7 @@ static char *get_argument(char **cmd, char **arglist)
arg = 0;
max = -1;
- argcount = strarray_length(arglist);
+ argcount = arglist == NULL ? 0 : strarray_length(arglist);
if (**cmd == '*') {
/* get all arguments */