r21322 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Mon May 16 07:36:20 UTC 2016


Author: fschmid
Date: Mon May 16 07:36:20 2016
New Revision: 21322

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21322
Log:
Fixed Bug #14060: Crash when using dropping image onto image frame via digikam or nemo

Modified:
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21322&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Mon May 16 07:36:20 2016
@@ -629,12 +629,16 @@
 		text = elemData->scribusElem();
 	else if (e->mimeData()->hasUrls())
 	{
-		QUrl url = e->mimeData()->urls().at(0);
-		QFileInfo fi(url.toLocalFile());
-		if (fi.exists())
-		{
-			fromFile = true;
-			text = url.toLocalFile();
+		QList<QUrl> urls = e->mimeData()->urls();
+		if (!urls.isEmpty())
+		{
+			QUrl url = urls[0];
+			QFileInfo fi(url.toLocalFile());
+			if (fi.exists())
+			{
+				fromFile = true;
+				text = url.toLocalFile();
+			}
 		}
 	}
 




More information about the scribus-commit mailing list