r22321 by craig -

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 30 22:45:55 UTC 2017


Author: craig
Date: Sat Dec 30 22:45:55 2017
New Revision: 22321

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22321
Log:
Fix Coverity 1405407

Modified:
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22321&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Sat Dec 30 22:45:55 2017
@@ -2958,18 +2958,14 @@
 
 void ScribusView::editExtendedImageProperties()
 {
-	if (Doc->m_Selection->count() != 0)
-	{
-		PageItem *currItem = Doc->m_Selection->itemAt(0);
-		if (currItem->pixm.imgInfo.valid)
-		{
-			ExtImageProps* dia = new ExtImageProps(this, &currItem->pixm.imgInfo, currItem, this);
-			dia->exec();
-			delete dia;
-			dia=NULL;
-			m_ScMW->propertiesPalette->setTextFlowMode(currItem->textFlowMode());
-		}
-	}
+	if (Doc->m_Selection->count() == 0)
+		return;
+	PageItem *currItem = Doc->m_Selection->itemAt(0);
+	if (!currItem->pixm.imgInfo.valid)
+		return;
+	QScopedPointer<ExtImageProps> dia(new ExtImageProps(this, &currItem->pixm.imgInfo, currItem, this));
+	dia->exec();
+	m_ScMW->propertiesPalette->setTextFlowMode(currItem->textFlowMode());
 }
 
 void ScribusView::ToPicFrame()




More information about the scribus-commit mailing list