r17651 by jghali - #10692: Crash on ungrouping

scribus-commit scribus-commit at lists.scribus.net
Sat Jun 30 15:31:13 UTC 2012


Author: jghali
Date: Sat Jun 30 15:31:12 2012
New Revision: 17651

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17651
Log:
#10692: Crash on ungrouping

Modified:
    trunk/Scribus/scribus/undomanager.cpp

Modified: trunk/Scribus/scribus/undomanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17651&path=/trunk/Scribus/scribus/undomanager.cpp
==============================================================================
--- trunk/Scribus/scribus/undomanager.cpp (original)
+++ trunk/Scribus/scribus/undomanager.cpp Sat Jun 30 15:31:12 2012
@@ -720,7 +720,8 @@
 {
 	for (uint i = 0; i < states_.size(); ++i)
 	{
-		if (states_[i]->undoObject()->getUId() == static_cast<uint>(uid))
+		UndoObject* undoObject = states_[i]->undoObject();
+		if (undoObject && undoObject->getUId() == static_cast<uint>(uid))
 			return true;
 	}
 	return false;
@@ -730,7 +731,8 @@
 {
 	for (uint i = 0; i < states_.size(); ++i)
 	{
-		if (states_[i]->undoObject()->getUId() != static_cast<uint>(uid))
+		UndoObject* undoObject = states_[i]->undoObject();
+		if (undoObject && undoObject->getUId() != static_cast<uint>(uid))
 			return false;
 	}
 	return true;




More information about the scribus-commit mailing list