Commit 6b7c482c authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

winspool: Avoid crash on NULL parameter (XcvOpenPort in OpenPrinter).

parent fc780346
......@@ -1441,7 +1441,9 @@ static HANDLE get_opened_printer_entry(LPCWSTR name, LPPRINTER_DEFAULTSW pDefaul
if (printer->pm) {
if ((printer->pm->monitor) && (printer->pm->monitor->pfnXcvOpenPort)) {
printer->pm->monitor->pfnXcvOpenPort(&printername[len], pDefault->DesiredAccess, &printer->hXcv);
printer->pm->monitor->pfnXcvOpenPort(&printername[len],
pDefault ? pDefault->DesiredAccess : 0,
&printer->hXcv);
}
if (printer->hXcv == NULL) {
SetLastError(ERROR_INVALID_PARAMETER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment