summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase.cpp
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-06-11 19:35:26 +0200
committerRobert Loehning <robert.loehning@qt.io>2020-06-15 20:50:32 +0200
commit9e51974d9bace46c40ebe585102d3102eedc8a35 (patch)
tree3152d071067245b12b103f6144dff86f535343d7 /src/gui/text/qfontdatabase.cpp
parent7e03bc39b8bcdaa4e83e72ac99e117561c124951 (diff)
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>
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r--src/gui/text/qfontdatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 993c37a92f..b5a9c5bb45 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -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();