fast bugfix, NtGdiExtEscape should accpect a NULL hdc.
authorMagnus Olsen <magnus@greatlord.com>
Sat, 1 Sep 2007 13:05:33 +0000 (13:05 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Sat, 1 Sep 2007 13:05:33 +0000 (13:05 +0000)
svn path=/trunk/; revision=28739

reactos/subsystems/win32/win32k/objects/print.c

index 31e0eef..05617c1 100644 (file)
@@ -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);