diff --git a/lib/common/cmdline.c b/lib/common/cmdline.c index d66ccc7..66f1976 100644 --- a/lib/common/cmdline.c +++ b/lib/common/cmdline.c @@ -203,7 +203,7 @@ pcmk__cmdline_preproc(char **argv, const char *special) { * glib does not. Grab both the argument and its value and * separate them into a new argument. */ - if (strchr(special, *ch) != NULL) { + if (special != NULL && strchr(special, *ch) != NULL) { /* The argument does not occur at the end of this string of * arguments. Take everything through the end as its value. */