Huw Davies : winspool: Don't try to match a printer to a server handle.

Alexandre Julliard julliard at winehq.org
Tue Jan 4 16:20:01 CST 2022


Module: wine
Branch: master
Commit: 4fcd040d903fc62c1e53b5eeb6091869b925a8f5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4fcd040d903fc62c1e53b5eeb6091869b925a8f5

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Jan  4 11:09:44 2022 +0000

winspool: Don't try to match a printer to a server handle.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51853
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winspool.drv/info.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index ac8f0994a1c..971eb654e6a 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -1002,10 +1002,9 @@ static HANDLE get_opened_printer_entry(LPWSTR name, LPPRINTER_DEFAULTSW pDefault
             if(handle == nb_printer_handles)
                 handle = i;
         }
-        else
+        else if (!queue && name && printer_handles[i]->name && !wcscmp( name, printer_handles[i]->name ))
         {
-            if(!queue && (name) && !wcscmp( name, printer_handles[i]->name ))
-                queue = printer_handles[i]->queue;
+            queue = printer_handles[i]->queue;
         }
     }
 




More information about the wine-cvs mailing list