From 52f3f70ce887c0f8877de7a8439bf44a246e7f9a Mon Sep 17 00:00:00 2001 From: Nicky Date: Wed, 10 Apr 2024 20:44:24 +0200 Subject: Make sure items get removed from maps before the item itself gets destroyed, Otherwise the viewer ends with a dangling pointer in the map --- indra/newview/llinventorymodel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llinventorymodel.cpp') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 05aa2e423f..ab8d085ae5 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2050,8 +2050,8 @@ void LLInventoryModel::deleteObject(const LLUUID& id, bool fix_broken_links, boo { LL_WARNS(LOG_INV) << "Deleting cat " << id << " while it still has child cats" << LL_ENDL; } + mParentChildCategoryTree.erase(id); delete cat_list; - mParentChildCategoryTree.erase(id); } addChangedMask(LLInventoryObserver::REMOVE, id); @@ -5040,4 +5040,3 @@ void LLInventoryModel::FetchItemHttpHandler::processFailure(const char * const r << LLCoreHttpUtil::responseToString(response) << "]" << LL_ENDL; gInventory.notifyObservers(); } - -- cgit v1.2.3