r20840 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 31 01:23:00 UTC 2016


Author: jghali
Date: Sun Jan 31 01:23:00 2016
New Revision: 20840

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20840
Log:
coverity #1350620: uninitialized pointer field

Modified:
    trunk/Scribus/scribus/gtwriter.cpp

Modified: trunk/Scribus/scribus/gtwriter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20840&path=/trunk/Scribus/scribus/gtwriter.cpp
==============================================================================
--- trunk/Scribus/scribus/gtwriter.cpp	(original)
+++ trunk/Scribus/scribus/gtwriter.cpp	Sun Jan 31 01:23:00 2016
@@ -47,7 +47,10 @@
 gtWriter::gtWriter(bool append, PageItem *pageitem)
 {
 	m_action = new gtAction(append, pageitem);
+	m_defaultStyle = NULL;
+	m_currentStyle = NULL;
 	m_errorSet = false;
+
 	m_action->setProgressInfo();
 	setDefaultStyle();
 	unsetCharacterStyle();
@@ -201,6 +204,8 @@
 {
 	if (!m_errorSet)
 		m_action->setProgressInfoDone();
-	delete m_action;
-	delete m_defaultStyle;
-}
+	if (m_action)
+		delete m_action;
+	if (m_defaultStyle)
+		delete m_defaultStyle;
+}




More information about the scribus-commit mailing list