r20952 by craig -

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 9 16:51:24 UTC 2016


Author: craig
Date: Tue Feb  9 16:51:24 2016
New Revision: 20952

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20952
Log:
#1350122, 1350123: Unchecked dynamic_cast

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20952&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Tue Feb  9 16:51:24 2016
@@ -2274,6 +2274,8 @@
 void ScribusDoc::restoreLevelDown(SimpleState* ss, bool isUndo)
 {
 	ScItemState<QList<QPointer<PageItem> > > *is = dynamic_cast<ScItemState<QList<QPointer<PageItem> > > *>(ss);
+	if (!is)
+		return;
 	QList<QPointer<PageItem> > listItem = is->getItem();
 	m_Selection->clear();
 	for (int i = 0; i<listItem.size();i++)
@@ -2287,6 +2289,8 @@
 void ScribusDoc::restoreLevelBottom(SimpleState* ss, bool isUndo)
 {
 	ScItemState<QList<QPointer<PageItem> > > *is = dynamic_cast<ScItemState<QList<QPointer<PageItem> > > *>(ss);
+	if (!is)
+		return;
 	QList<QPointer<PageItem> > listItem = is->getItem();
 	m_Selection->clear();
 	for (int i = 0; i<listItem.size();i++)




More information about the scribus-commit mailing list