r22317 by craig -

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 30 22:35:27 UTC 2017


Author: craig
Date: Sat Dec 30 22:35:27 2017
New Revision: 22317

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22317
Log:
Fix Coverity issues in Outlinepalette

Modified:
    trunk/Scribus/scribus/ui/outlinepalette.cpp

Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22317&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp	(original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp	Sat Dec 30 22:35:27 2017
@@ -757,6 +757,8 @@
 			while ( (*it) )
 			{
 				item = dynamic_cast<OutlineTreeItem*>(*it);
+				if (!item)
+					qFatal("OutlinePalette::getListItem !item");
 				if ((item->type == 2) && (item->PageObject->pageNr() == SNr))
 				{
 					retVal = (*it);
@@ -907,6 +909,8 @@
 	while ( (*it) )
 	{
 		item = dynamic_cast<OutlineTreeItem*>(*it);
+		if (!item)
+			qFatal("OutlinePalette::reopenTree !item");
 		for (int olc = 0; olc < currDoc->OpenNodes.count(); olc++)
 		{
 			if (item->type == currDoc->OpenNodes[olc].type)
@@ -940,6 +944,8 @@
 	while ( (*it) )
 	{
 		item = dynamic_cast<OutlineTreeItem*>(*it);
+		if (!item)
+			qFatal("OutlinePalette::buildReopenVals !item");
 		if (item->isExpanded())
 		{
 			ol.type = item->type;
@@ -972,6 +978,8 @@
 		{
 			QTreeWidgetItem* ite = items[a];
 			OutlineTreeItem *item = dynamic_cast<OutlineTreeItem*>(ite);
+			if (!item)
+				qFatal("OutlineWidget::slotMultiSelect !item");
 			PageItem *pgItem = NULL;
 			switch (item->type)
 			{




More information about the scribus-commit mailing list