From a2de480807b7d573c64e5a54826e5bcd53208f4f Mon Sep 17 00:00:00 2001 From: "Mike Antipov (Mike ProductEngine)" Date: Tue, 27 Oct 2009 16:34:33 +0200 Subject: 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 --- indra/newview/llfloaterinventory.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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); -- cgit v1.2.3