forked from qt-creator/qt-creator
AssetExport: Avoid null pointer dereferencing
Change-Id: Iea146c41800139bcf9bd8e917a47293ce3504cf4 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -41,8 +41,8 @@ Q_LOGGING_CATEGORY(loggerInfo, "qtc.designer.assetExportPlugin.filePathModel", Q
|
|||||||
|
|
||||||
void findQmlFiles(QFutureInterface<Utils::FilePath> &f, const Project *project)
|
void findQmlFiles(QFutureInterface<Utils::FilePath> &f, const Project *project)
|
||||||
{
|
{
|
||||||
if (!project && !f.isCanceled())
|
if (!project || f.isCanceled())
|
||||||
f.reportFinished({});
|
return;
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
Utils::FilePaths qmlFiles = project->files([&f, &index](const Node* node) ->bool {
|
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++);
|
f.reportResult(path, index++);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
f.reportFinished();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user