[ros-diffs] [greatlrd] 28739: fast bugfix, NtGdiExtEscape should accpect a NULL hdc.

greatlrd at svn.reactos.org greatlrd at svn.reactos.org
Sat Sep 1 15:05:33 CEST 2007


Author: greatlrd
Date: Sat Sep  1 17:05:33 2007
New Revision: 28739

URL: http://svn.reactos.org/svn/reactos?rev=28739&view=rev
Log:
fast bugfix, NtGdiExtEscape should accpect a NULL hdc. 

Modified:
    trunk/reactos/subsystems/win32/win32k/objects/print.c

Modified: trunk/reactos/subsystems/win32/win32k/objects/print.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/print.c?rev=28739&r1=28738&r2=28739&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/print.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/print.c Sat Sep  1 17:05:33 2007
@@ -156,12 +156,18 @@
    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);




More information about the Ros-diffs mailing list