summaryrefslogtreecommitdiffstats
path: root/src/gui/embedded/qwindowsystem_qws.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/embedded/qwindowsystem_qws.cpp')
-rw-r--r--src/gui/embedded/qwindowsystem_qws.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/embedded/qwindowsystem_qws.cpp b/src/gui/embedded/qwindowsystem_qws.cpp
index a521319..dfc1e76 100644
--- a/src/gui/embedded/qwindowsystem_qws.cpp
+++ b/src/gui/embedded/qwindowsystem_qws.cpp
@@ -1768,10 +1768,16 @@ void QWSServerPrivate::cleanupFonts(bool force)
#if defined(QWS_DEBUG_FONTCLEANUP)
qDebug() << "removing unused font file" << fontName;
#endif
- QFile::remove(QFile::decodeName(fontName));
- sendFontRemovedEvent(fontName);
-
- it = fontReferenceCount.erase(it);
+ QT_TRY {
+ QFile::remove(QFile::decodeName(fontName));
+ sendFontRemovedEvent(fontName);
+
+ it = fontReferenceCount.erase(it);
+ } QT_CATCH(...) {
+ // so we were not able to remove the font.
+ // don't be angry and just continue with the next ones.
+ ++it;
+ }
}
}