summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-08 17:31:02 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-08 17:31:02 -0500
commitd4b888d47840d57b071dd2cf6dea492c4230e4b4 (patch)
tree86c75e2c49a6b0ecab69d96c94942675ecf0239b /indra/newview/llinventorymodel.cpp
parentf7c883be9a4bbdcf5e4255ff52e6e6d0824b60ab (diff)
EXT-3133: Viewer crashes after deleting a Trash folder from the My Inventory accordion
Put in a quick fix so that folders can't be made reparented to their own children. --HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index fb9be1e04f..5d8a8805b5 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -192,6 +192,8 @@ void LLInventoryModel::cleanupInventory()
BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id,
const LLUUID& cat_id) const
{
+ if (obj_id == cat_id) return TRUE;
+
const LLInventoryObject* obj = getObject(obj_id);
while(obj)
{