r22307 by craig -

scribus-commit scribus-commit at lists.scribus.net
Fri Dec 29 23:19:52 UTC 2017


Author: craig
Date: Fri Dec 29 23:19:51 2017
New Revision: 22307

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

Modified:
    trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp

Modified: trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22307&path=/trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp	Fri Dec 29 23:19:51 2017
@@ -14,6 +14,7 @@
 
 #include <QApplication>
 #include <QByteArray>
+#include <QScopedPointer>
 #include <QXmlInputSource>
 #include <QXmlSimpleReader>
 #include "color.h"
@@ -1373,10 +1374,9 @@
 		if (!PrefsManager::instance()->appPrefs.fontPrefs.GFontSub.contains(family))
 		{
 			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-			MissingFont *dia = new MissingFont(0, family, m_Doc);
+			QScopedPointer<MissingFont> dia(new MissingFont(0, family, m_Doc));
 			dia->exec();
 			fontName = dia->getReplacementFont();
-			delete dia;
 			qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 			PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family] = fontName;
 		}




More information about the scribus-commit mailing list