From 4cb44c744c7d15658df79b801296b98fdc956336 Mon Sep 17 00:00:00 2001 From: Jesus Fernandez Date: Thu, 4 Aug 2016 17:01:37 +0200 Subject: Added pointer check in QFontDatabase::load CID 11131 (#1 of 1): Dereference after null check (FORWARD_NULL)46. var_deref_op: Dereferencing null pointer fe. Change-Id: Ifc0cd0b208db511516db93c3d0e0367299df6d80 Reviewed-by: Timur Pocheptsov Reviewed-by: Konstantin Ritt --- src/gui/text/qfontdatabase.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 7b88a73c61..074d9707f1 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -2799,6 +2799,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script) req.fallBackFamilies.clear(); } + Q_ASSERT(fe); if (fe->symbol || (d->request.styleStrategy & QFont::NoFontMerging)) { for (int i = 0; i < QChar::ScriptCount; ++i) { if (!d->engineData->engines[i]) { -- cgit v1.2.3