diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-02-17 12:21:41 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-02-17 12:17:42 +0000 |
commit | 998c2a73804aa24c38c1c21bab38a95407459a73 (patch) | |
tree | c9d1b53def09e1a0cdb32d0e30c5da0fa55063c7 | |
parent | 7aa8dc38e99698857a37307b518fc3b4b18252db (diff) | |
download | qt-creator-998c2a73804aa24c38c1c21bab38a95407459a73.tar.gz |
SessionManager: Fix possible crashes in session manager
Change-Id: Icd97c765fb4d5b88ff2986b927433e2583817605
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
-rw-r--r-- | src/plugins/projectexplorer/session.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 8e9bcbc1bb..c0ddad60e0 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()) { |