summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-28 13:05:08 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-28 13:21:37 (GMT)
commitc9c54682bcd23598ac7a8db3b10e9f18c978e268 (patch)
treefd3f9ac932e73f58c6cf058f9ba2b9f1b475663b /src/gui/painting
parent63e89c45fcc07759c928231ac27cc25928116d45 (diff)
downloadQt-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.cpp2
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) {