CMakePM: Fix crash when file system progress bar was cancelled

If the user cancelled the file system progress bar, the the
m_allFiles will be null and shouldn't be used.

Fixes: QTCREATORBUG-27499
Change-Id: I92c509f1e66d0968f921ec103fd81631eed9ab38
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Cristian Adam
2022-05-10 13:14:14 +02:00
parent 42857ce43f
commit 6b781b4fe9

View File

@@ -702,7 +702,8 @@ void CMakeBuildSystem::updateFileSystemNodes()
addCMakeLists(newRoot.get(), std::move(fileNodes)); addCMakeLists(newRoot.get(), std::move(fileNodes));
} }
addFileSystemNodes(newRoot.get(), m_allFiles); if (m_allFiles)
addFileSystemNodes(newRoot.get(), m_allFiles);
setRootProjectNode(std::move(newRoot)); setRootProjectNode(std::move(newRoot));
m_reader.resetData(); m_reader.resetData();