From 7252505879a031a08d92f7701b9184ca09ae80ec Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Wed, 1 Jul 2020 14:23:49 +0200 Subject: [PATCH] AssetExport: Avoid null pointer dereferencing Change-Id: Iea146c41800139bcf9bd8e917a47293ce3504cf4 Reviewed-by: Eike Ziller --- .../qmldesigner/assetexporterplugin/filepathmodel.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/assetexporterplugin/filepathmodel.cpp b/src/plugins/qmldesigner/assetexporterplugin/filepathmodel.cpp index 36c175414b5..c0cfeacb972 100644 --- a/src/plugins/qmldesigner/assetexporterplugin/filepathmodel.cpp +++ b/src/plugins/qmldesigner/assetexporterplugin/filepathmodel.cpp @@ -41,8 +41,8 @@ Q_LOGGING_CATEGORY(loggerInfo, "qtc.designer.assetExportPlugin.filePathModel", Q void findQmlFiles(QFutureInterface &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 &f, const Project *project) f.reportResult(path, index++); return true; }); - f.reportFinished(); } }