summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-28 15:05:08 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-29 09:05:26 +0200
commitb2db259a32576ac3c6f03f7834920157ea827567 (patch)
tree98f0552aa0a1f94220ae001bc2ac01a5885730ef /src
parent544babaaf9d84bc52de1b8e4a7e5e55043125eb7 (diff)
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 (cherry picked from commit c9c54682bcd23598ac7a8db3b10e9f18c978e268)
Diffstat (limited to 'src')
-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 53f025f819..e9e56a2d58 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -296,7 +296,7 @@ void QTextureGlyphCache::fillInPendingGlyphs()
QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g, QFixed subPixelPosition) 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) {