From f9600b733557b4b29d0ab9f230cc9d87887d3039 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 3 Sep 2020 11:23:59 +0200 Subject: [PATCH] CMakePM: Fix removing cmake tools The id might be destroyed with its parent before trying to reference it again and put it into the list. Change-Id: Ic7bb053293b24f0f0109a1c6479f73b7cbec2dc0 Reviewed-by: hjk --- src/plugins/cmakeprojectmanager/cmakesettingspage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp index 61e3dba76fd..e26a0cb9706 100644 --- a/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp +++ b/src/plugins/cmakeprojectmanager/cmakesettingspage.cpp @@ -343,8 +343,8 @@ void CMakeToolItemModel::removeCMakeTool(const Utils::Id &id) CMakeToolTreeItem *treeItem = cmakeToolItem(id); QTC_ASSERT(treeItem, return); - destroyItem(treeItem); m_removedItems.append(id); + destroyItem(treeItem); } void CMakeToolItemModel::apply()