Avoid crash if no default cups printer is set.

This commit is contained in:
Alexander Gottwald 2002-08-27 22:33:09 +00:00 committed by Alexandre Julliard
parent b5753597f1
commit 9c071eaefd

View file

@ -137,7 +137,7 @@ CUPS_LoadPrinters(void) {
hadprinter = TRUE;
if (!strcmp(def,printers[i]))
if (def && !strcmp(def,printers[i]))
WINSPOOL_SetDefaultPrinter(printers[i],printers[i],FALSE);
memset(&pinfo2a,0,sizeof(pinfo2a));
pinfo2a.pPrinterName = printers[i];