summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-03-28 07:03:27 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-03-28 07:03:38 (GMT)
commitc61d6de8de9aa43ccdd49419b9a03af61cefde73 (patch)
tree6f8e99c3d927847e8aeb5ee49881a743bc506a30
parentfc7b63d4ca216d4256185aa5d522d02dd27b224c (diff)
downloadQt-c61d6de8de9aa43ccdd49419b9a03af61cefde73.zip
Qt-c61d6de8de9aa43ccdd49419b9a03af61cefde73.tar.gz
Qt-c61d6de8de9aa43ccdd49419b9a03af61cefde73.tar.bz2
Fix crash and infinite recursion caused by previous commits
Reviewed-by: TrustMe
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
-rw-r--r--src/gui/text/qfontengine_qpf.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 6c6781c..db0156a 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1875,7 +1875,7 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g, QFixed subPixelPosition)
Glyph *glyph = defaultGlyphSet.outline_drawing ? 0 : loadGlyph(g, subPixelPosition, glyph_format);
if (!glyph) {
unlockFace();
- return QFontEngine::alphaMapForGlyph(g, subPixelPosition);
+ return QFontEngine::alphaMapForGlyph(g);
}
const int pitch = antialias ? (glyph->width + 3) & ~3 : ((glyph->width + 31)/32) * 4;
diff --git a/src/gui/text/qfontengine_qpf.cpp b/src/gui/text/qfontengine_qpf.cpp
index bfd04e6..d35bbe5 100644
--- a/src/gui/text/qfontengine_qpf.cpp
+++ b/src/gui/text/qfontengine_qpf.cpp
@@ -306,7 +306,8 @@ QFontEngineQPF::QFontEngineQPF(const QFontDef &def, int fileDescriptor, QFontEng
glyphMapEntries = 0;
glyphDataOffset = 0;
glyphDataSize = 0;
- glyphFormat = renderingFontEngine->glyphFormat;
+ if (renderingFontEngine)
+ glyphFormat = renderingFontEngine->glyphFormat;
kerning_pairs_loaded = false;
readOnly = true;