diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-04-28 13:05:08 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-04-28 13:21:37 (GMT) |
commit | c9c54682bcd23598ac7a8db3b10e9f18c978e268 (patch) | |
tree | fd3f9ac932e73f58c6cf058f9ba2b9f1b475663b /src/gui/painting | |
parent | 63e89c45fcc07759c928231ac27cc25928116d45 (diff) | |
download | Qt-c9c54682bcd23598ac7a8db3b10e9f18c978e268.zip Qt-c9c54682bcd23598ac7a8db3b10e9f18c978e268.tar.gz Qt-c9c54682bcd23598ac7a8db3b10e9f18c978e268.tar.bz2 |
Fix crash in raster on X11 when text contains unsupported characters
We would assume the font engine was a FT engine and do a static cast
here, which would cause a crash if the box engine was in use instead.
Task-number: QTBUG-17443
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qtextureglyphcache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 2420f31..3918ffc 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -178,7 +178,7 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g) const { #if defined(Q_WS_X11) - if (m_transform.type() > QTransform::TxTranslate) { + if (m_transform.type() > QTransform::TxTranslate && m_current_fontengine->type() == QFontEngine::Freetype) { QFontEngineFT::GlyphFormat format = QFontEngineFT::Format_None; QImage::Format imageFormat = QImage::Format_Invalid; switch (m_type) { |