r20842 by fschmid -
scribus-commit
scribus-commit at lists.scribus.net
Sun Jan 31 08:05:49 UTC 2016
Author: fschmid
Date: Sun Jan 31 08:05:49 2016
New Revision: 20842
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20842
Log:
Fixed Bug #13687: crash when trying to remove a font path
Modified:
trunk/Scribus/scribus/ui/prefs_fonts.cpp
Modified: trunk/Scribus/scribus/ui/prefs_fonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20842&path=/trunk/Scribus/scribus/ui/prefs_fonts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_fonts.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_fonts.cpp Sun Jan 31 08:05:49 2016
@@ -374,14 +374,15 @@
}
else
return;
- SCFontsIterator it(m_availFonts);
- for ( ; it.hasNext(); it.next())
- {
- if (it.current().isNone())
+ QMutableMapIterator<QString,ScFace> it(m_availFonts);
+ while (it.hasNext())
+ {
+ it.next();
+ if (it.value().isNone())
continue;
- QFileInfo fi(it.current().fontFilePath());
+ QFileInfo fi(it.value().fontFilePath());
if (fi.absolutePath() == path)
- m_availFonts.remove(it.currentKey());
+ m_availFonts.remove(it.key());
}
m_availFonts.updateFontMap();
CurrentPath = "";
More information about the scribus-commit
mailing list