summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-09-26 10:18:46 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-09-26 10:47:54 (GMT)
commite05734987594f0e54f58a2ab3037cdf4956e9036 (patch)
treec92534c87a35506802e63664427486df3b1b6962
parent6d1160ebb58a35a70afd689223d167eaf13490fd (diff)
downloadQt-e05734987594f0e54f58a2ab3037cdf4956e9036.zip
Qt-e05734987594f0e54f58a2ab3037cdf4956e9036.tar.gz
Qt-e05734987594f0e54f58a2ab3037cdf4956e9036.tar.bz2
Fix possible crash in QFontEngineFT
Avoid crash if set pointer is null. Task-number: QTBUG-21647 Reviewed-by: Jiang Jiang
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index e20aa25..d00a048 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -801,7 +801,7 @@ int QFontEngineFT::loadFlags(QGlyphSet *set, GlyphFormat format, int flags,
if (set && set->outline_drawing)
load_flags = FT_LOAD_NO_BITMAP;
- if (default_hint_style == HintNone || (flags & HB_ShaperFlag_UseDesignMetrics) || set->outline_drawing)
+ if (default_hint_style == HintNone || (flags & HB_ShaperFlag_UseDesignMetrics) || (set && set->outline_drawing))
load_flags |= FT_LOAD_NO_HINTING;
else
load_flags |= load_target;