[NtGDI]
authorJames Tabor <james.tabor@reactos.org>
Fri, 30 Jun 2017 23:23:33 +0000 (23:23 +0000)
committerJames Tabor <james.tabor@reactos.org>
Fri, 30 Jun 2017 23:23:33 +0000 (23:23 +0000)
- Memory DC with no surface selected return true. WIP and part of CORE-12888.

svn path=/trunk/; revision=75251

reactos/win32ss/gdi/ntgdi/fillshap.c
reactos/win32ss/gdi/ntgdi/freetype.c

index 15d743a..c23e934 100644 (file)
@@ -597,7 +597,7 @@ IntRectangle(PDC dc,
     psurf = dc->dclevel.pSurface;
     if (!psurf)
     {
-        ret = FALSE;
+        ret = TRUE;
         goto cleanup;
     }
 
@@ -1085,7 +1085,7 @@ NtGdiExtFloodFill(
 
     if (!dc->dclevel.pSurface)
     {
-        Ret = FALSE;
+        Ret = TRUE;
         goto cleanup;
     }
 
index 87227c0..898f58c 100644 (file)
@@ -5147,6 +5147,13 @@ GreExtTextOutW(
         goto good;
     }
 
+    if (!dc->dclevel.pSurface)
+    {
+        /* Memory DC with no surface selected */
+        DC_UnlockDc(dc);
+        return TRUE;
+    }
+
     if (lprc && (fuOptions & (ETO_OPAQUE | ETO_CLIPPED)))
     {
         IntLPtoDP(dc, (POINT *)lprc, 2);
@@ -5172,11 +5179,6 @@ GreExtTextOutW(
     BrushOrigin.x = 0;
     BrushOrigin.y = 0;
 
-    if (!dc->dclevel.pSurface)
-    {
-        goto fail;
-    }
-
     if ((fuOptions & ETO_OPAQUE) && lprc)
     {
         DestRect.left   = lprc->left;