forked from qt-creator/qt-creator
Fix a crash when configured kit list is empty
Task-number: QTCREATORBUG-17841 Change-Id: I73453c12d264961c6d766fbc58ceb1468104833c Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Tobias Hunger
parent
db1e1db1e2
commit
1a5bdf14ad
@@ -89,11 +89,13 @@ void QmakeKitInformation::setup(Kit *k)
|
||||
&& t->language() == Core::Id(Constants::CXX_LANGUAGE_ID)
|
||||
&& version->qtAbis().contains(t->targetAbi());
|
||||
});
|
||||
ToolChain *possibleTc
|
||||
= Utils::findOr(possibleTcs, possibleTcs.last(),
|
||||
[&spec](const ToolChain *t) { return t->suggestedMkspecList().contains(spec); });
|
||||
if (possibleTc)
|
||||
ToolChainKitInformation::setToolChain(k, possibleTc);
|
||||
if (!possibleTcs.isEmpty()) {
|
||||
ToolChain *possibleTc
|
||||
= Utils::findOr(possibleTcs, possibleTcs.last(),
|
||||
[&spec](const ToolChain *t) { return t->suggestedMkspecList().contains(spec); });
|
||||
if (possibleTc)
|
||||
ToolChainKitInformation::setToolChain(k, possibleTc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user