gdi32: Make sure that World2Vport DC transformation is valid before using it.

Dmitry Timoshkov dmitry at codeweavers.com
Thu Feb 5 02:41:29 CST 2009


This patch fixes the problem reported in the bug #16410.
---
 dlls/gdi32/freetype.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index bad2705..34e4aed 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -3333,7 +3333,7 @@ GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont)
     {
         /* Windows 3.1 compatibility mode GM_COMPATIBLE has only limited
            font scaling abilities. */
-        dcmat.eM11 = dcmat.eM22 = fabs(dc->xformWorld2Vport.eM22);
+        dcmat.eM11 = dcmat.eM22 = dc->vport2WorldValid ? fabs(dc->xformWorld2Vport.eM22) : 1.0;
         dcmat.eM21 = dcmat.eM12 = 0;
     }
 
-- 
1.6.1




More information about the wine-patches mailing list