mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
winspool: Avoid crash on NULL parameter (XcvOpenPort in OpenPrinter).
This commit is contained in:
parent
fc78034638
commit
6b7c482cb6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user