diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp index 9664c9eda53..d4e89a26a92 100644 --- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp @@ -48,9 +48,8 @@ public: CMakeEditor::CMakeEditor() { CMakeTool *tool = nullptr; - if (auto project = ProjectTree::currentProject()) - if (auto bs = ProjectTree::currentBuildSystem()) - tool = CMakeKitAspect::cmakeTool(bs->target()->kit()); + if (auto bs = ProjectTree::currentBuildSystem()) + tool = CMakeKitAspect::cmakeTool(bs->target()->kit()); if (!tool) tool = CMakeToolManager::defaultCMakeTool();