diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 9b834bc6263..d1cca77c0bf 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -747,8 +747,8 @@ void CMakeBuildSystem::handleParsingSucceeded(bool restoredFromBackup) checkAndReportError(errorMessage); } - const CMakeTool *tool = m_parameters.cmakeTool(); - m_ctestPath = tool->cmakeExecutable().withNewPath(m_reader.ctestPath()); + if (const CMakeTool *tool = m_parameters.cmakeTool()) + m_ctestPath = tool->cmakeExecutable().withNewPath(m_reader.ctestPath()); setApplicationTargets(appTargets()); setDeploymentData(deploymentData());