[WIN32K]
[reactos.git] / 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(