From 5cabf50164fa113bb427095f06620b3f6483d5e2 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 13 Nov 2018 14:10:43 +0100 Subject: [PATCH] Check if the string inside the families list is empty and not the list This amends 97f73e957756753b09a778daf2ee8f0ddb97f746 and accounts for when the minimial QPA platform is used ensuring the fallback to the QFontEngineBox. Task-number: QTBUG-71743 Change-Id: I72d45e02754fe31e31a2234d53c45e1d20dfa3d2 Reviewed-by: Liang Qi Reviewed-by: Allan Sandfeld Jensen --- src/gui/text/qfontdatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 42e7871214..fa9573441a 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2830,7 +2830,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script) fe = QFontDatabase::findFont(req, script); if (fe) { - if (fe->type() == QFontEngine::Box && !req.families.isEmpty()) { + if (fe->type() == QFontEngine::Box && !req.families.at(0).isEmpty()) { if (fe->ref.load() == 0) delete fe; fe = 0;