]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add check for whether 'option' variable exists or not for closeUI and JCLCloseUI... 78/head
author= <awesomepranshu@gmail.com>
Fri, 22 Jan 2021 19:14:09 +0000 (00:44 +0530)
committer= <awesomepranshu@gmail.com>
Fri, 22 Jan 2021 19:14:09 +0000 (00:44 +0530)
cups/ppd.c

index ae411cb3a902233ae7be00cb6aefb6dec28d2662..a82c8a5840099d376408902d3cd14c3f3f872c27 100644 (file)
@@ -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