summaryrefslogtreecommitdiff
path: root/cmdutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c
index f95778822e..feeea694d8 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -281,8 +281,8 @@ unknown_opt:
fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt);
exit(1);
}
- } else {
- po->u.func_arg(arg);
+ } else if (po->u.func_arg) {
+ po->u.func_arg(arg);
}
if(po->flags & OPT_EXIT)
exit(0);