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 9545051..7384817 100644
--- a/src/gui/embedded/qwindowsystem_qws.cpp
+++ b/src/gui/embedded/qwindowsystem_qws.cpp
@@ -1761,10 +1761,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;
+ }
}
}