QmlDesigner: Fix Coverity scan defects

Change-Id: I07a61fe4498ae0b28baaa969f0decfa5689b4443
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Thomas Hartmann
2019-10-21 09:00:55 +02:00
parent ac84f8a457
commit 5e225f85eb
2 changed files with 6 additions and 5 deletions

View File

@@ -424,7 +424,8 @@ void DocumentManager::findPathToIsoProFile(bool *iconResourceFileAlreadyExists,
if (!iconQrcFileNode) {
// The QRC file that we want doesn't exist or is not listed under RESOURCES in the .pro.
*resourceFilePath = project->projectDirectory().toString() + "/" + isoIconsQrcFile;
if (project)
*resourceFilePath = project->projectDirectory().toString() + "/" + isoIconsQrcFile;
// We assume that the .pro containing the QML file is an acceptable place to add the .qrc file.
ProjectExplorer::ProjectNode *projectNode = ProjectExplorer::ProjectTree::nodeForFile(qmlFileName)->parentProjectNode();