r20908 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 6 23:22:51 UTC 2016


Author: jghali
Date: Sat Feb  6 23:22:51 2016
New Revision: 20908

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

Modified:
    trunk/Scribus/scribus/plugins/picbrowser/collection.cpp
    trunk/Scribus/scribus/plugins/picbrowser/collection.h

Modified: trunk/Scribus/scribus/plugins/picbrowser/collection.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20908&path=/trunk/Scribus/scribus/plugins/picbrowser/collection.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/collection.cpp	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/collection.cpp	Sat Feb  6 23:22:51 2016
@@ -256,6 +256,7 @@
 
 collectionListReaderThread::collectionListReaderThread ( QStringList &xmlFiles2 )
 {
+	m_clrt = 0;
 	restartThread = false;
 
 	xmlFiles = xmlFiles2;
@@ -270,9 +271,9 @@
 	}
 
 	xmlFile = xmlFiles.takeAt ( 0 );
-	clrt = new collectionReaderThread ( xmlFile, false );
-	connect ( clrt, SIGNAL ( finished() ), this, SLOT ( collectionReaderThreadFinished() ) );
-	clrt->start();
+	m_clrt = new collectionReaderThread ( xmlFile, false );
+	connect ( m_clrt, SIGNAL ( finished() ), this, SLOT ( collectionReaderThreadFinished() ) );
+	m_clrt->start();
 
 	exec();
 }
@@ -286,8 +287,8 @@
 
 void collectionListReaderThread::collectionReaderThreadFinished()
 {
-	readCollections.append ( clrt->collection );
-	delete clrt;
+	readCollections.append ( m_clrt->collection );
+	delete m_clrt;
 
 	if ( xmlFiles.isEmpty() || restartThread )
 	{
@@ -296,9 +297,9 @@
 	else
 	{
 		xmlFile = xmlFiles.takeAt ( 0 );
-		clrt = new collectionReaderThread ( xmlFile, false );
-		connect ( clrt, SIGNAL ( finished() ), this, SLOT ( collectionReaderThreadFinished() ) );
-		clrt->start();
+		m_clrt = new collectionReaderThread ( xmlFile, false );
+		connect ( m_clrt, SIGNAL ( finished() ), this, SLOT ( collectionReaderThreadFinished() ) );
+		m_clrt->start();
 	}
 }
 

Modified: trunk/Scribus/scribus/plugins/picbrowser/collection.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20908&path=/trunk/Scribus/scribus/plugins/picbrowser/collection.h
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/collection.h	(original)
+++ trunk/Scribus/scribus/plugins/picbrowser/collection.h	Sat Feb  6 23:22:51 2016
@@ -137,7 +137,7 @@
 		void collectionReaderThreadFinished();
 
 	private:
-		collectionReaderThread *clrt;
+		collectionReaderThread *m_clrt;
 };
 
 




More information about the scribus-commit mailing list