summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-08-26 14:10:45 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-08-26 14:10:45 (GMT)
commit743117fa94b5e8807b0b9f9b16f2a712e6bfb47f (patch)
treef5d6c4206af385c940e36d94b49c5480d5804dbb /src/gui/text
parent5ef11e48dd3bd8a6d51028128ee957aba27b0100 (diff)
parent5be87d57602d72c225943f052783c1053cd3d81a (diff)
downloadQt-743117fa94b5e8807b0b9f9b16f2a712e6bfb47f.zip
Qt-743117fa94b5e8807b0b9f9b16f2a712e6bfb47f.tar.gz
Qt-743117fa94b5e8807b0b9f9b16f2a712e6bfb47f.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontengine_win.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 173b822..7a9d958 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -327,8 +327,10 @@ QFontEngineWin::QFontEngineWin(const QString &name, HFONT _hfont, bool stockFont
BOOL res = GetTextMetrics(hdc, &tm);
fontDef.fixedPitch = !(tm.tmPitchAndFamily & TMPF_FIXED_PITCH);
- if (!res)
+ if (!res) {
qErrnoWarning("QFontEngineWin: GetTextMetrics failed");
+ ZeroMemory(&tm, sizeof(TEXTMETRIC));
+ }
cache_cost = tm.tmHeight * tm.tmAveCharWidth * 2000;
getCMap();