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

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


Revision: 13796
Author: jghali
Date: 2009-07-28T22:17:19.870774Z
Commit message: #8307 : crash when deleting line style in style manager

Changeset: 
M  /trunk/Scribus/scribus/ui/smlinestyle.cpp

Diffs:
Index: scribus/ui/smlinestyle.cpp
===================================================================
--- scribus/ui/smlinestyle.cpp	(revision 13795)
+++ scribus/ui/smlinestyle.cpp	(revision 13796)
@@ -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