Alexandre Julliard : gdi32: Use the correct physdev for each driver call ( Coverity).
Alexandre Julliard
julliard at winehq.org
Fri Dec 28 15:05:14 CST 2012
Module: wine
Branch: master
Commit: 227fc26e63cd922a8a5db9c8d22ff73756e2d398
URL: http://source.winehq.org/git/wine.git/?a=commit;h=227fc26e63cd922a8a5db9c8d22ff73756e2d398
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Dec 27 20:53:25 2012 +0100
gdi32: Use the correct physdev for each driver call (Coverity).
---
dlls/gdi32/font.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index fe32167..c6a6946 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -312,7 +312,7 @@ static UINT get_default_smoothing( HKEY key )
static BOOL get_char_positions( DC *dc, const WCHAR *str, 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;
@@ -320,6 +320,7 @@ static BOOL get_char_positions( DC *dc, const WCHAR *str, INT count, INT *dx, SI
dev = GET_DC_PHYSDEV( dc, pGetTextMetrics );
dev->funcs->pGetTextMetrics( dev, &tm );
+ dev = GET_DC_PHYSDEV( dc, pGetTextExtentExPoint );
if (!dev->funcs->pGetTextExtentExPoint( dev, str, count, dx )) return FALSE;
if (dc->breakExtra || dc->breakRem)
@@ -349,7 +350,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 +358,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)
More information about the wine-cvs
mailing list