r13795 by jghali - #8307 : crash when deleting line style in style manager

scribus-commit scribus-commit at lists.scribus.net
Wed Jul 29 00:20:19 CEST 2009


Revision: 13795
Author: jghali
Date: 2009-07-28T22:16:42.111471Z
Commit message: #8307 : crash when deleting line style in style manager

Changeset: 
M  /branches/Version135/Scribus/scribus/smlinestyle.cpp

Diffs:
Index: scribus/smlinestyle.cpp
===================================================================
--- scribus/smlinestyle.cpp	(revision 13794)
+++ scribus/smlinestyle.cpp	(revision 13795)
@@ -288,8 +288,11 @@
 
 QString SMLineStyle::shortcut(const QString &stylename) const
 {
-	Q_ASSERT(tmpLines.contains(stylename));
-	return tmpLines[stylename].shortcut;
+	QString s;
+	QMap<QString, multiLine>::ConstIterator it = tmpLines.find(stylename);
+	if (it != tmpLines.end())
+		s = it.value().shortcut;
+	return s;
 }
 
 void SMLineStyle::setShortcut(const QString &shortcut)




More information about the scribus-commit mailing list