forked from qt-creator/qt-creator
CmakeProject: Don't crash on addKit + cancel
This was introduced by adding the remote linux support for 3.0 in
328a24edee. If the user cancels the
run cmake dialog, no buildconfiguration is created. The adding of kit
should then not happen. A target without a buildconfiguration should
not happen.
Task-number: QTCREATORBUG-12773
Change-Id: Ic43c5cc13f9e114ea24cc97154a6c084125f6318
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
committed by
Christian Stenger
parent
434389bd93
commit
92cdd7045b
@@ -604,6 +604,8 @@ bool CMakeProject::fromMap(const QVariantMap &map)
|
||||
bool CMakeProject::setupTarget(Target *t)
|
||||
{
|
||||
t->updateDefaultBuildConfigurations();
|
||||
if (t->buildConfigurations().isEmpty())
|
||||
return false;
|
||||
t->updateDefaultDeployConfigurations();
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user