CMake: Fix crash in CMakeOpenProjectWizard

Change-Id: Icb78bb7c1a652913852a77a59cd729c4d8745d4d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Daniel Teske
2012-11-05 12:37:34 +01:00
parent 86c14292d2
commit 8be5ac0ebc

View File

@@ -175,6 +175,8 @@ QList<GeneratorInfo> GeneratorInfo::generatorInfosFor(ProjectExplorer::Kit *k, N
{
QList<GeneratorInfo> results;
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (!tc)
return results;
ProjectExplorer::Abi targetAbi = tc->targetAbi();
if (n != ForceNinja) {
if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) {
@@ -575,9 +577,6 @@ void CMakeRunPage::initializePage()
ProjectExplorer::KitManager::instance()->kits();
foreach (ProjectExplorer::Kit *k, kitList) {
ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (!tc)
continue;
QList<GeneratorInfo> infos = GeneratorInfo::generatorInfosFor(k,
hasNinjaGenerator ? GeneratorInfo::OfferNinja : GeneratorInfo::NoNinja,
hasCodeBlocksGenerator);