Author: jimtabor
Date: Fri Jun 30 23:23:33 2017
New Revision: 75251
URL: 
http://svn.reactos.org/svn/reactos?rev=75251&view=rev
Log:
[NtGDI]
- Memory DC with no surface selected return true. WIP and part of CORE-12888.
Modified:
    trunk/reactos/win32ss/gdi/ntgdi/fillshap.c
    trunk/reactos/win32ss/gdi/ntgdi/freetype.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/fillshap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/fillshap…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/fillshap.c  [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/fillshap.c  [iso-8859-1] Fri Jun 30 23:23:33 2017
@@ -597,7 +597,7 @@
     psurf = dc->dclevel.pSurface;
     if (!psurf)
     {
-        ret = FALSE;
+        ret = TRUE;
         goto cleanup;
     }
@@ -1085,7 +1085,7 @@
     if (!dc->dclevel.pSurface)
     {
-        Ret = FALSE;
+        Ret = TRUE;
         goto cleanup;
     }
Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/freetype.c  [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c  [iso-8859-1] Fri Jun 30 23:23:33 2017
@@ -5147,6 +5147,13 @@
         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);
@@ -5171,11 +5178,6 @@
     MaskRect.top = 0;
     BrushOrigin.x = 0;
     BrushOrigin.y = 0;
-
-    if (!dc->dclevel.pSurface)
-    {
-        goto fail;
-    }
     if ((fuOptions & ETO_OPAQUE) && lprc)
     {