summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qfont.cpp')
-rw-r--r--src/gui/text/qfont.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 24887b5d80..21a31a35ec 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -2616,10 +2616,8 @@ void QFontCache::cleanup()
} QT_CATCH (const std::bad_alloc &) {
// no cache - just ignore
}
- if (cache && cache->hasLocalData()) {
- cache->localData()->clear();
+ if (cache && cache->hasLocalData())
cache->setLocalData(0);
- }
}
#endif // QT_NO_THREAD
@@ -2631,6 +2629,7 @@ QFontCache::QFontCache()
QFontCache::~QFontCache()
{
+ clear();
{
EngineDataCache::ConstIterator it = engineDataCache.constBegin(),
end = engineDataCache.constEnd();