Fix crash due to memory access violation
authorKonstantin Ritt <ritt.ks@gmail.com>
Sat, 20 Oct 2012 00:19:20 +0000 (03:19 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 22 Oct 2012 01:35:39 +0000 (03:35 +0200)
The font engine has been re-used without increasing it's reference counter

Task-number: QTBUG-27596
Change-Id: Icd4c3ca131446255ad4a27da8aa9a6c69177212e
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
src/gui/text/qfontengine_qpa.cpp

index 37195d5..c6e8a53 100644 (file)
@@ -726,6 +726,7 @@ void QFontEngineMultiQPA::setFallbackFamiliesList(const QStringList &fallbacks)
         // Turns out we lied about having any fallback at all.
         fallbackFamilies << fe->fontDef.family;
         engines[1] = fe;
+        fe->ref.ref();
     }
     fallbacksQueried = true;
 }