summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMike Antipov (Mike ProductEngine) <mantipov@productengine.com>2009-10-27 16:34:33 +0200
committerMike Antipov (Mike ProductEngine) <mantipov@productengine.com>2009-10-27 16:34:33 +0200
commita2de480807b7d573c64e5a54826e5bcd53208f4f (patch)
tree682ca36e4027ad70400c1f08500d4d886ae822c0 /indra
parentbfc9445563c5ad200ed609bc8ff3edecb2398d28 (diff)
Fixed normal bug EXT-1859 (Only just added landmark is shown in "favorites bar" folder)
Reason: items of Inventory Panel's start folder are removed while processing Inventory model changed event. In this case root items have no parent LLFolderViewFolder and parent is LLFolderView (LLInventoryPanel::mFolders) itself. Fix: - added check of LLFolderViewItem's parent against NULL. --HG-- branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterinventory.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp
index c890f9f122..a47916b7d7 100644
--- a/indra/newview/llfloaterinventory.cpp
+++ b/indra/newview/llfloaterinventory.cpp
@@ -1438,7 +1438,11 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID());
- if (view_item->getParentFolder() != new_parent)
+
+ // added check against NULL for cases when Inventory panel contains startFolder.
+ // in this case parent is LLFolderView (LLInventoryPanel::mFolders) itself.
+ // this check is a fix for bug EXT-1859.
+ if (NULL != new_parent && view_item->getParentFolder() != new_parent)
{
view_item->getParentFolder()->extractItem(view_item);
view_item->addToFolder(new_parent, mFolders);