summaryrefslogtreecommitdiffstats
path: root/ctxopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctxopt.c')
-rw-r--r--ctxopt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ctxopt.c b/ctxopt.c
index f73ff7c..858cedc 100644
--- a/ctxopt.c
+++ b/ctxopt.c
@@ -358,10 +358,11 @@ fatal(errors e, char * errmsg)
break;
case CTXOPTUNXARG:
- fprintf(stderr,
- "The parameter %s takes no arguments "
- "or has too many arguments.\n",
- cur_state->cur_opt_par_name);
+ if (cur_state->cur_opt_par_name != NULL)
+ fprintf(stderr,
+ "The parameter %s takes no arguments "
+ "or has too many arguments.\n",
+ cur_state->cur_opt_par_name);
break;
case CTXOPTMISARG: