From a5fb852b7c74c89e385fa5fff840f24ff63e4095 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 16 Jul 2012 18:04:18 +0200 Subject: [PATCH] projectexplorer: prevent crash on complex setting changes. When Qt Versions and Profiles are removed simultaneously, the profiles cannot be updated anymore. Change-Id: I2022fb701d4d9f0704dda6a83c8f53b8add61c14 Reviewed-by: Daniel Teske --- src/plugins/projectexplorer/profilemodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/projectexplorer/profilemodel.cpp b/src/plugins/projectexplorer/profilemodel.cpp index 76d5ffce64a..9802d4b5553 100644 --- a/src/plugins/projectexplorer/profilemodel.cpp +++ b/src/plugins/projectexplorer/profilemodel.cpp @@ -508,6 +508,9 @@ void ProfileModel::removeProfile(Profile *p) void ProfileModel::updateProfile(Profile *p) { ProfileNode *n = find(p); + // This can happen if Qt Versions and Profiles are removed simultaneously. + if (!n) + return; if (n->widget) n->widget->discard(); QModelIndex idx = index(n);