diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qfontdatabase_qpa.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp index dca45e4..315f8f5 100644 --- a/src/gui/text/qfontdatabase_qpa.cpp +++ b/src/gui/text/qfontdatabase_qpa.cpp @@ -384,8 +384,12 @@ void QFontDatabase::load(const QFontPrivate *d, int script) req.family = *it; fe = QFontDatabase::findFont(script, d, req); - if (fe && (fe->type()==QFontEngine::Box) && !req.family.isEmpty()) + if (fe && (fe->type()==QFontEngine::Box) && !req.family.isEmpty()) { + if (fe->ref == 0) + delete fe; + fe = 0; + } } if (fe->symbol || (d->request.styleStrategy & QFont::NoFontMerging)) { |