diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 99cb43eab40..e89878a6b30 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -702,7 +702,8 @@ void CMakeBuildSystem::updateFileSystemNodes() addCMakeLists(newRoot.get(), std::move(fileNodes)); } - addFileSystemNodes(newRoot.get(), m_allFiles); + if (m_allFiles) + addFileSystemNodes(newRoot.get(), m_allFiles); setRootProjectNode(std::move(newRoot)); m_reader.resetData();