AndroidGdbServerKitInformation: Don't crash without a toolchain

Change-Id: I9d74c0725cb7c4e7cd205b931040479dae494164
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Daniel Teske
2013-02-14 17:30:54 +01:00
committed by Tobias Hunger
parent 1e0f6d607f
commit 8d15776839

View File

@@ -98,7 +98,7 @@ void AndroidGdbServerKitInformation::setGdbSever(ProjectExplorer::Kit *kit, cons
Utils::FileName AndroidGdbServerKitInformation::autoDetect(ProjectExplorer::Kit *kit)
{
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(kit);
if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
if (!tc || tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
return Utils::FileName();
AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc);
return atc->suggestedGdbServer();