From: = Date: Fri, 22 Jan 2021 19:14:09 +0000 (+0530) Subject: Add check for whether 'option' variable exists or not for closeUI and JCLCloseUI... X-Git-Tag: v2.3.3op2~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F78%2Fhead;p=thirdparty%2Fcups.git Add check for whether 'option' variable exists or not for closeUI and JCLCloseUI lines in ppd.c --- diff --git a/cups/ppd.c b/cups/ppd.c index ae411cb3a9..a82c8a5840 100644 --- a/cups/ppd.c +++ b/cups/ppd.c @@ -1496,7 +1496,7 @@ _ppdOpen( goto error; } - if (!_cups_strcasecmp(option->defchoice, "custom") || !_cups_strncasecmp(option->defchoice, "custom.", 7)) + if (option && (!_cups_strcasecmp(option->defchoice, "custom") || !_cups_strncasecmp(option->defchoice, "custom.", 7))) { /* * "*DefaultOption: Custom..." may set the default to a custom value @@ -1531,7 +1531,7 @@ _ppdOpen( goto error; } - if (!_cups_strcasecmp(option->defchoice, "custom") || !_cups_strncasecmp(option->defchoice, "custom.", 7)) + if (option && (!_cups_strcasecmp(option->defchoice, "custom") || !_cups_strncasecmp(option->defchoice, "custom.", 7))) { /* * "*DefaultOption: Custom..." may set the default to a custom value