From d0183207eb28dc4764200c3ad4603a40ede0ce55 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 12:58:06 +0000 Subject: CID-79 Checker: FORWARD_NULL Function: LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem *) File: /indra/newview/llsidepaneliteminfo.cpp --- indra/newview/llsidepaneliteminfo.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llsidepaneliteminfo.cpp') diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 44348ba429..3d5120b18c 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -231,6 +231,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) // PERMISSIONS LOOKUP // //////////////////////// + llassert(item); + if (!item) return; + // do not enable the UI for incomplete items. BOOL is_complete = item->isComplete(); const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); -- cgit v1.2.3 From d74fe63645242648d2ff972364b0531a67f58c7b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 12:59:04 +0000 Subject: CID-79 cleanup --- indra/newview/llsidepaneliteminfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llsidepaneliteminfo.cpp') diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 3d5120b18c..0275736f6d 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -240,14 +240,14 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD); const LLPermissions& perm = item->getPermissions(); const BOOL can_agent_manipulate = gAgent.allowOperation(PERM_OWNER, perm, - GP_OBJECT_MANIPULATE); + GP_OBJECT_MANIPULATE); const BOOL can_agent_sell = gAgent.allowOperation(PERM_OWNER, perm, - GP_OBJECT_SET_SALE) && + GP_OBJECT_SET_SALE) && !cannot_restrict_permissions; const BOOL is_link = item->getIsLinkType(); const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - bool not_in_trash = item && (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id); + bool not_in_trash = (item->getUUID() != trash_id) && !gInventory.isObjectDescendentOf(item->getUUID(), trash_id); // You need permission to modify the object to modify an inventory // item in it. -- cgit v1.2.3