QFontDatabase: Guard against Null-dereference READ

Fixes: oss-fuzz-23112
Pick-to: 5.15
Change-Id: I06818d8642067cd510a513838e7851eb8b322aef
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
bb10
Robert Loehning 2020-06-11 19:35:26 +02:00
parent 7e03bc39b8
commit 9e51974d9b
1 changed files with 1 additions and 1 deletions

View File

@ -2321,7 +2321,7 @@ bool QFontDatabase::removeAllApplicationFonts()
QMutexLocker locker(fontDatabaseMutex());
QFontDatabasePrivate *db = privateDb();
if (db->applicationFonts.isEmpty())
if (!db || db->applicationFonts.isEmpty())
return false;
db->applicationFonts.clear();