forked from qt-creator/qt-creator
SessionManager: Fix possible crashes in session manager
Change-Id: Icd97c765fb4d5b88ff2986b927433e2583817605 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -332,7 +332,7 @@ void SessionManager::setActiveBuildConfiguration(Target *target, BuildConfigurat
|
||||
if (otherProject == target->project())
|
||||
continue;
|
||||
Target *otherTarget = otherProject->activeTarget();
|
||||
if (otherTarget->kit()->id() != kitId)
|
||||
if (!otherTarget || otherTarget->kit()->id() != kitId)
|
||||
continue;
|
||||
|
||||
foreach (BuildConfiguration *otherBc, otherTarget->buildConfigurations()) {
|
||||
@@ -360,7 +360,7 @@ void SessionManager::setActiveDeployConfiguration(Target *target, DeployConfigur
|
||||
if (otherProject == target->project())
|
||||
continue;
|
||||
Target *otherTarget = otherProject->activeTarget();
|
||||
if (otherTarget->kit()->id() != kitId)
|
||||
if (!otherTarget || otherTarget->kit()->id() != kitId)
|
||||
continue;
|
||||
|
||||
foreach (DeployConfiguration *otherDc, otherTarget->deployConfigurations()) {
|
||||
|
||||
Reference in New Issue
Block a user