CMakePM: Fix crash when runing qtcreator -test CMakeProjectManager

Change-Id: I3535c1edd0c72eba3c1bcd50234baeb4c1acecc5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2023-10-04 20:35:23 +02:00
parent 1d449ad7d6
commit 08cebc7e08

View File

@@ -149,7 +149,8 @@ CMakeManager::CMakeManager()
Constants::RUN_CMAKE_PROFILER,
globalContext);
command->setDescription(m_cmakeProfilerAction->text());
manalyzer->addAction(command, Debugger::Constants::G_ANALYZER_TOOLS);
if (manalyzer)
manalyzer->addAction(command, Debugger::Constants::G_ANALYZER_TOOLS);
connect(m_cmakeProfilerAction, &QAction::triggered, this, [this] {
runCMakeWithProfiling(ProjectManager::startupBuildSystem());
});