r21985 by craig - Coverity 1350058: Unchecked return value on datafile open

scribus-commit scribus-commit at lists.scribus.net
Sun Apr 23 09:44:19 UTC 2017


Author: craig
Date: Sun Apr 23 09:44:19 2017
New Revision: 21985

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21985
Log:
Coverity 1350058: Unchecked return value on datafile open

Modified:
    trunk/Scribus/scribus/iconmanager.cpp

Modified: trunk/Scribus/scribus/iconmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21985&path=/trunk/Scribus/scribus/iconmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/iconmanager.cpp	(original)
+++ trunk/Scribus/scribus/iconmanager.cpp	Sun Apr 23 09:44:19 2017
@@ -90,7 +90,8 @@
 			QFile dataFile(file.absoluteFilePath());
 			if (!dataFile.exists())
 				continue;
-			dataFile.open(QIODevice::ReadOnly);
+			if (!dataFile.open(QIODevice::ReadOnly))
+				continue;
 			QTextStream ts(&dataFile);
 			ts.setCodec(QTextCodec::codecForName("UTF-8"));
 			QString errorMsg;




More information about the scribus-commit mailing list