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@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2018-11-22 08:53:39 +00:00 committed by Alexandre Julliard
parent bcf885bda2
commit 0c5ce58505
1 changed files with 2 additions and 0 deletions

View File

@ -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;