r21945 by craig - Fix Coverity #1405375, unchecked return

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 21 07:09:13 UTC 2017


Author: craig
Date: Fri Apr 21 07:09:13 2017
New Revision: 21945

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21945
Log:
Fix Coverity #1405375, unchecked return

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

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21945&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp	Fri Apr 21 07:09:13 2017
@@ -3012,9 +3012,9 @@
 {
 	m_blockUpdate = true;
 	EditorBar->setRepaint(false);
-	SearchReplace* dia = new SearchReplace(this, m_doc, m_item, false);
-	dia->exec();
-	int pos = dia->firstMatchCursorPosition();
+	SearchReplace dia(this, m_doc, m_item, false);
+	dia.exec();
+	int pos = dia.firstMatchCursorPosition();
 	if (pos >= 0)
 	{
 		QTextCursor tCursor = Editor->textCursor();
@@ -3022,7 +3022,6 @@
 		Editor->setTextCursor(tCursor);
 		Editor->SelStack.push(qMakePair(pos, -1));
 	}
-	delete dia;
 	qApp->processEvents();
 	m_blockUpdate = false;
 	EditorBar->setRepaint(true);




More information about the scribus-commit mailing list