[WIN32K]
authorJérôme Gardou <jerome.gardou@reactos.org>
Mon, 19 Apr 2010 21:56:44 +0000 (21:56 +0000)
committerJérôme Gardou <jerome.gardou@reactos.org>
Mon, 19 Apr 2010 21:56:44 +0000 (21:56 +0000)
  - Do not access surface before holding ppdev Lock

svn path=/branches/reactos-yarotows/; revision=46951

subsystems/win32/win32k/objects/bitblt.c

index e247fd7..95aadff 100644 (file)
@@ -942,13 +942,6 @@ IntPatBlt(
 
     ASSERT(pbrush);
 
-    psurf = pdc->dclevel.pSurface;
-    if (psurf == NULL)
-    {
-        SetLastWin32Error(ERROR_INVALID_HANDLE);
-        return FALSE;
-    }
-
     if (pbrush->flAttrs & GDIBRUSH_IS_NULL)
     {
         return TRUE;
@@ -988,6 +981,8 @@ IntPatBlt(
 
     DC_vPrepareDCsForBlit(pdc, DestRect, NULL, DestRect);
 
+    psurf = pdc->dclevel.pSurface;
+
     EBRUSHOBJ_vInit(&eboFill, pbrush, pdc);
 
     ret = IntEngBitBlt(