AssetExport: Avoid null pointer dereferencing

Change-Id: Iea146c41800139bcf9bd8e917a47293ce3504cf4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Vikas Pachdha
2020-07-01 14:23:49 +02:00
parent e0a39f4d34
commit 7252505879

View File

@@ -41,8 +41,8 @@ Q_LOGGING_CATEGORY(loggerInfo, "qtc.designer.assetExportPlugin.filePathModel", Q
void findQmlFiles(QFutureInterface<Utils::FilePath> &f, const Project *project)
{
if (!project && !f.isCanceled())
f.reportFinished({});
if (!project || f.isCanceled())
return;
int index = 0;
Utils::FilePaths qmlFiles = project->files([&f, &index](const Node* node) ->bool {
@@ -54,7 +54,6 @@ void findQmlFiles(QFutureInterface<Utils::FilePath> &f, const Project *project)
f.reportResult(path, index++);
return true;
});
f.reportFinished();
}
}