[ros-diffs] [jimtabor] 30931: Unbreak gdi batch... Sometimes dc is null.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Sat Dec 1 14:26:46 CET 2007


Author: jimtabor
Date: Sat Dec  1 16:26:45 2007
New Revision: 30931

URL: http://svn.reactos.org/svn/reactos?rev=30931&view=rev
Log:
Unbreak gdi batch... Sometimes dc is null.

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

Modified: trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c?rev=30931&r1=30930&r2=30931&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/gdibatch.c Sat Dec  1 16:26:45 2007
@@ -23,10 +23,11 @@
   if (hDC)
   {
     dc = DC_LockDc(hDC);
-    if (!dc)
-        return pHdr->Size; // Return the full size of the structure.
-    Dc_Attr = dc->pDc_Attr;
-    if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
+    if (dc)
+    {
+      Dc_Attr = dc->pDc_Attr;
+      if (!Dc_Attr) Dc_Attr = &dc->Dc_Attr;
+    }
   }
   // The thread is approaching the end of sunset.
   switch(pHdr->Cmd)




More information about the Ros-diffs mailing list