Check for NULL ptr in PSDRV_GetDeviceCapabilities.
This commit is contained in:
parent
8bc6e0041c
commit
e8742dddde
|
@ -300,8 +300,16 @@ DWORD WINAPI PSDRV_DeviceCapabilities16(LPCSTR lpszDevice, LPCSTR lpszPort,
|
|||
PRINTERINFO *pi;
|
||||
DEVMODEA *lpdm;
|
||||
pi = PSDRV_FindPrinterInfo(lpszDevice);
|
||||
|
||||
TRACE("Cap=%d. Got PrinterInfo = %p\n", fwCapability, pi);
|
||||
|
||||
|
||||
if (!pi) {
|
||||
ERR("no printerinfo for %s, return 0!\n",lpszDevice);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
lpdm = lpDevMode ? lpDevMode : (DEVMODEA *)pi->Devmode;
|
||||
|
||||
switch(fwCapability) {
|
||||
|
|
Loading…
Reference in New Issue