r22320 by craig -

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 30 22:43:31 UTC 2017


Author: craig
Date: Sat Dec 30 22:43:31 2017
New Revision: 22320

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

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22320&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Sat Dec 30 22:43:31 2017
@@ -6674,11 +6674,13 @@
 		QList<QMdiSubWindow *> windows = mdiArea->subWindowList();
 		if (!windows.isEmpty())
 		{
-			int windowCount=static_cast<int>(windows.count());
+			int windowCount=windows.count();
 			for ( int i = 0; i < windowCount; ++i )
 			{
 				QWidget* w = windows.at(i)->widget();
 				ScribusWin* scw = dynamic_cast<ScribusWin *>(w);
+				if (!scw)
+					qFatal("ScribusMainWindow::slotPrefsOrg !scw");
 				ScribusView* scw_v = scw->view();
 				if (oldPrefs.displayPrefs.displayScale != m_prefsManager->displayScale())
 				{
@@ -6695,7 +6697,7 @@
 			}
 		}
 
-		QString newMonitorProfile = newPrefs.colorPrefs.DCMSset.DefaultMonitorProfile;
+		QString newMonitorProfile(newPrefs.colorPrefs.DCMSset.DefaultMonitorProfile);
 		if (oldMonitorProfile != newMonitorProfile)
 		{
 			bool success = false;




More information about the scribus-commit mailing list