[PATCH] gdi32: move dev = GET_DC_PHYSDEV usage to the right place (Coverity)

Marcus Meissner meissner at suse.de
Thu Dec 27 13:50:43 CST 2012


---
 dlls/gdi32/font.c |    3 ++-
 1 Datei geändert, 2 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)

diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index fe32167..7169723 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -349,7 +349,7 @@ static BOOL get_char_positions( DC *dc, const WCHAR *str, INT count, INT *dx, SI
 static BOOL get_char_positions_indices( DC *dc, const WORD *indices, INT count, INT *dx, SIZE *size )
 {
     TEXTMETRICW tm;
-    PHYSDEV dev = GET_DC_PHYSDEV( dc, pGetTextExtentExPoint );
+    PHYSDEV dev;
 
     size->cx = size->cy = 0;
     if (!count) return TRUE;
@@ -357,6 +357,7 @@ static BOOL get_char_positions_indices( DC *dc, const WORD *indices, INT count,
     dev = GET_DC_PHYSDEV( dc, pGetTextMetrics );
     dev->funcs->pGetTextMetrics( dev, &tm );
 
+    dev = GET_DC_PHYSDEV( dc, pGetTextExtentExPoint );
     if (!dev->funcs->pGetTextExtentExPointI( dev, indices, count, dx )) return FALSE;
 
     if (dc->breakExtra || dc->breakRem)
-- 
1.7.10.4




More information about the wine-patches mailing list