summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-05-16 17:12:22 -0700
committerMerov Linden <merov@lindenlab.com>2014-05-16 17:12:22 -0700
commit23acc30e2709dac1aa54eecda5c1bc6b2b226b5b (patch)
treea9806926b108e9b3da4b82b9f04d6e89cccdd4d5 /indra/newview/llinventorymodel.cpp
parent10591cce8e36e4c27c4a68c68c0502eaa24d8964 (diff)
DD-102 : Fix crash when emptying trash containing nested folders. Also avoid getting listings several times
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rwxr-xr-xindra/newview/llinventorymodel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 0fbccb2f3f..c379fb5f3a 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1217,6 +1217,11 @@ void LLInventoryModel::deleteObject(const LLUUID& id)
LLViewerInventoryCategory* cat = (LLViewerInventoryCategory*)((LLInventoryObject*)obj);
cat_list->removeObj(cat);
}
+
+ // Note : We need to tell the inventory observers that those things are going to be deleted *before* the tree is cleared or they won't know what to delete (in views and view models)
+ addChangedMask(LLInventoryObserver::REMOVE, id);
+ gInventory.notifyObservers();
+
item_list = getUnlockedItemArray(id);
if(item_list)
{
@@ -1229,10 +1234,8 @@ void LLInventoryModel::deleteObject(const LLUUID& id)
delete cat_list;
mParentChildCategoryTree.erase(id);
}
- addChangedMask(LLInventoryObserver::REMOVE, id);
obj = NULL; // delete obj
updateLinkedObjectsFromPurge(id);
- gInventory.notifyObservers();
}
// Delete a particular inventory item by ID, and remove it from the server.