diff --git a/reactos/subsystems/win32/win32k/objects/print.c b/reactos/subsystems/win32/win32k/objects/print.c index 31e0eef3dad..05617c1d7dc 100644 --- a/reactos/subsystems/win32/win32k/objects/print.c +++ b/reactos/subsystems/win32/win32k/objects/print.c @@ -156,12 +156,18 @@ NtGdiExtEscape( INT OutSize, OPTIONAL LPSTR UnsafeOutData) { - PDC pDC = DC_LockDc(hDC); + PDC pDC; LPVOID SafeInData = NULL; LPVOID SafeOutData = NULL; NTSTATUS Status = STATUS_SUCCESS; INT Result; + if (hDC == 0) + { + hDC = (HDC)UserGetWindowDC(NULL); + } + + pDC = DC_LockDc(hDC); if ( pDC == NULL ) { SetLastWin32Error(ERROR_INVALID_HANDLE);