Huw Davies : winspool: Skip the old printer check if it has a NULL port name.
Alexandre Julliard
julliard at winehq.org
Sun Mar 3 13:21:30 CST 2019
Module: wine
Branch: oldstable
Commit: 883c1cff03ed3ae03731ec844dca8f143973944a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=883c1cff03ed3ae03731ec844dca8f143973944a
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Nov 22 08:53:39 2018 +0000
winspool: Skip the old printer check if it has a NULL port name.
Based on a patch by Alistair Leslie-Hughes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33502
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 0c5ce58505e24bf07cbd4c09752ef2f949d64fd0)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
dlls/winspool.drv/info.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 9c24256..bbdcaac 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -1572,6 +1572,8 @@ static void old_printer_check( BOOL delete_phase )
EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 5, (LPBYTE)pi, needed, &needed, &num );
for (i = 0; i < num; i++)
{
+ if (!pi[i].pPortName) continue;
+
if (strncmpW( pi[i].pPortName, CUPS_Port, strlenW(CUPS_Port) ) &&
strncmpW( pi[i].pPortName, LPR_Port, strlenW(LPR_Port) ))
continue;
More information about the wine-cvs
mailing list