forked from qt-creator/qt-creator
CMake: Prevent crash if kit has no toolchain
Amendsbeb167a963
. (cherry picked from commitb3375cfd56
) Fixes: QTCREATORBUG-26777 Change-Id: I65feee771a21bdfbb2a102419a0d778af97a22eb Reviewed-by: Christiaan Janssen <christiaan.janssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -807,7 +807,9 @@ static bool isDocker(const Kit *k)
|
||||
|
||||
static bool isWindowsARM64(const Kit *k)
|
||||
{
|
||||
const auto targetAbi = ToolChainKitAspect::cxxToolChain(k)->targetAbi();
|
||||
ToolChain *toolchain = ToolChainKitAspect::cxxToolChain(k);
|
||||
QTC_ASSERT(toolchain, return false);
|
||||
const Abi targetAbi = toolchain->targetAbi();
|
||||
return targetAbi.os() == Abi::WindowsOS && targetAbi.architecture() == Abi::ArmArchitecture
|
||||
&& targetAbi.wordWidth() == 64;
|
||||
}
|
||||
|
Reference in New Issue
Block a user