diff --git a/reactos/subsystems/win32/win32k/eng/device.c b/reactos/subsystems/win32/win32k/eng/device.c index b355eb7f209..360c96d6748 100644 --- a/reactos/subsystems/win32/win32k/eng/device.c +++ b/reactos/subsystems/win32/win32k/eng/device.c @@ -62,6 +62,7 @@ EngDeviceIoControl(HANDLE hDevice, nInBufferSize, lpOutBuffer, nOutBufferSize, FALSE, &Event, &Iosb); + if (!Irp) return ERROR_NOT_ENOUGH_MEMORY; Status = IoCallDriver(DeviceObject, Irp);