r20862 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Mon Feb 1 13:10:38 UTC 2016


Author: jghali
Date: Mon Feb  1 13:10:38 2016
New Revision: 20862

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

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

Modified: trunk/Scribus/scribus/ui/collectforoutput_ui.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20862&path=/trunk/Scribus/scribus/ui/collectforoutput_ui.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/collectforoutput_ui.cpp	(original)
+++ trunk/Scribus/scribus/ui/collectforoutput_ui.cpp	Mon Feb  1 13:10:38 2016
@@ -20,7 +20,9 @@
 CollectForOutput_UI::CollectForOutput_UI(QWidget* parent, ScribusDoc* doc, QString outputDirectory, bool withFonts, bool withProfiles, bool compressDoc) :
 	CollectForOutput(doc, outputDirectory, withFonts, withProfiles, compressDoc)
 {
-	uiCollect=true;
+	uiCollect = true;
+	progressDialog = 0;
+
 	connect(this, SIGNAL(fontsCollected(int)), this, SLOT(collectedFonts(int)));
 	connect(this, SIGNAL(itemsCollected(int)), this, SLOT(collectedItems(int)));
 	connect(this, SIGNAL(patternsCollected(int)), this, SLOT(collectedPatterns(int)));
@@ -32,7 +34,7 @@
 	if (!newDirDialog())
 		return "Collect cancelled or unable to create collect destination directory";
 
-	progressDialog=new MultiProgressDialog("Collect for Output", "Cancel");
+	progressDialog = new MultiProgressDialog("Collect for Output", "Cancel");
 	QStringList barNames, barTexts;
 	QList<bool> barsNumeric;
 	barNames << "items";
@@ -73,11 +75,8 @@
 	}
 	progressDialog->setOverallProgress(0);
 
-
-
 	ScCore->fileWatcher->forceScan();
 	ScCore->fileWatcher->stop();
-
 
 	progressDialog->show();
 //	connect(progressDialog, SIGNAL(canceled()), this, SLOT(cancelRequested()));
@@ -125,8 +124,11 @@
 	ScCore->fileWatcher->start();
 	collectedFiles.clear();
 	newFileName=newName;
+
 	progressDialog->close();
 	delete progressDialog;
+	progressDialog = 0;
+
 	return QString::null;
 }
 




More information about the scribus-commit mailing list