CMakePM: Fix nullptr access

Amends 1b1fc43954.

Change-Id: Idfcf5bb2c58f37f366cb739475c7ba2d56d76e48
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2022-09-30 07:33:49 +02:00
parent 685cc1a2fc
commit 58a4cd0804

View File

@@ -1145,11 +1145,14 @@ Tasks CMakeConfigurationKitAspect::validate(const Kit *k) const
{
QTC_ASSERT(k, return Tasks());
const CMakeTool *const cmake = CMakeKitAspect::cmakeTool(k);
if (!cmake)
return Tasks();
const QtSupport::QtVersion *const version = QtSupport::QtKitAspect::qtVersion(k);
const ToolChain *const tcC = ToolChainKitAspect::cToolChain(k);
const ToolChain *const tcCxx = ToolChainKitAspect::cxxToolChain(k);
const CMakeConfig config = configuration(k);
const CMakeTool *const cmake = CMakeKitAspect::cmakeTool(k);
const bool isQt4 = version && version->qtVersion() < QVersionNumber(5, 0, 0);
FilePath qmakePath; // This is relative to the cmake used for building.