[PATCH 2/2] d2d1: Exit earlier on error state from d2d_device_context_DrawGlyphRun().

Nikolay Sivov nsivov at codeweavers.com
Fri Oct 5 02:23:23 CDT 2018


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/d2d1/device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/d2d1/device.c b/dlls/d2d1/device.c
index 1e420514a8..87ac8c8d1e 100644
--- a/dlls/d2d1/device.c
+++ b/dlls/d2d1/device.c
@@ -1355,6 +1355,9 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawGlyphRun(ID2D1DeviceContext
     TRACE("iface %p, baseline_origin %s, glyph_run %p, brush %p, measuring_mode %#x.\n",
             iface, debug_d2d_point_2f(&baseline_origin), glyph_run, brush, measuring_mode);
 
+    if (FAILED(context->error.code))
+        return;
+
     rendering_params = context->text_rendering_params ? context->text_rendering_params
             : context->default_text_rendering_params;
 
@@ -1386,9 +1389,6 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawGlyphRun(ID2D1DeviceContext
         ;
     }
 
-    if (FAILED(context->error.code))
-        return;
-
     rendering_mode = DWRITE_RENDERING_MODE_DEFAULT;
     switch (context->drawing_state.textAntialiasMode)
     {
-- 
2.19.0




More information about the wine-devel mailing list