diff --git a/cmdutils.c b/cmdutils.c index 4f27f50f40..1f7ecc4887 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -273,7 +273,7 @@ unknown_opt: *po->u.int64_arg = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX); } else if (po->flags & OPT_FLOAT) { *po->u.float_arg = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY); - } else { + } else if (po->u.func_arg) { if (po->u.func_arg(opt, arg) < 0) { fprintf(stderr, "%s: failed to set value '%s' for option '%s'\n", argv[0], arg, opt); exit(1);