[PATCH] winspool.drv.so + cups segfault (resend)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The patch I sent a short time ago had a big logic error. So I send a new
one.

I found a bug, where wine is crashing if no default cups printer is set
(eg all cups servers with printers attached are offline)

2002-08-03  Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>

       * dlls/winspool/info.c: Check for NULL pointer

bye
    ago
-- 
 Alexander.Gottwald@informatik.tu-chemnitz.de
 http://www.gotti.org           ICQ: 126018723
Index: dlls/winspool/info.c
===================================================================
RCS file: /home/wine/wine/dlls/winspool/info.c,v
retrieving revision 1.55
diff -u -r1.55 info.c
--- dlls/winspool/info.c	31 May 2002 23:40:57 -0000	1.55
+++ dlls/winspool/info.c	23 Aug 2002 19:24:20 -0000
@@ -137,7 +137,7 @@
 
 	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];

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux