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 <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
Jesus Fernandez 2016-08-04 17:01:37 +02:00
parent 434c522695
commit 4cb44c744c

View File

@ -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]) {