From 998c2a73804aa24c38c1c21bab38a95407459a73 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Wed, 17 Feb 2016 12:21:41 +0100 Subject: [PATCH] SessionManager: Fix possible crashes in session manager Change-Id: Icd97c765fb4d5b88ff2986b927433e2583817605 Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 8e9bcbc1bb0..c0ddad60e01 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -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()) {