Check for NULL ptr in PSDRV_GetDeviceCapabilities.

This commit is contained in:
Marcus Meissner 2000-02-20 13:35:54 +00:00 committed by Alexandre Julliard
parent 8bc6e0041c
commit e8742dddde
1 changed files with 8 additions and 0 deletions

View File

@ -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) {