r22318 by craig -

scribus-commit scribus-commit at lists.scribus.net
Sat Dec 30 22:40:32 UTC 2017


Author: craig
Date: Sat Dec 30 22:40:32 2017
New Revision: 22318

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

Modified:
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22318&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Sat Dec 30 22:40:32 2017
@@ -941,11 +941,15 @@
 	activateWindow();
 	if (!m_ScMW->scriptIsRunning())
 		raise();
-	m_ScMW->newActWin((dynamic_cast<ScribusWin*>(Doc->WinHan))->getSubWin());
+
+	ScribusWin* sw = dynamic_cast<ScribusWin*>(Doc->WinHan);
+	if (!sw)
+		qFatal("ScribusView::contentsDropEvent !sw");
+	m_ScMW->newActWin(sw->getSubWin());
 	updateContents();
 	//>>
 	QFileInfo fi;
-	QString ext = "";
+	QString ext;
 	if (!e->mimeData()->formats().contains("application/x-scribus-elem"))
 	{
 		fi.setFile(url.toLocalFile());




More information about the scribus-commit mailing list