From 7786c8638a107953b779dbbedc39a4dfa85f5848 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:21:08 +0000 Subject: CID-420 Checker: NULL_RETURNS Function: open_inventory_offer(const std::vector> &, const std::basic_string, std::allocator>&) File: /indra/newview/llviewermessage.cpp --- indra/newview/llviewermessage.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d9b5344dd4..29301e4d1c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -867,6 +867,10 @@ void open_inventory_offer(const std::vector& items, const std::string& f } LLInventoryItem* item = gInventory.getItem(item_id); + llassert(item); + if (!item) { + continue; + } //////////////////////////////////////////////////////////////////////////////// // Special handling for various types. -- cgit v1.2.3 From 1562b12b6ca7aa5687e44ef0a99cbfbce3bb1cb4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 17:23:53 +0000 Subject: CID-408 Checker: UNUSED_VALUE Function: LLOfferInfo::inventory_task_offer_callback(const LLSD &, const LLSD &) File: /indra/newview/llviewermessage.cpp dead code. --- indra/newview/llviewermessage.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 29301e4d1c..8aa642bdb6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1306,13 +1306,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null); msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent()); LLInventoryObserver* opener = NULL; - LLViewerInventoryCategory* catp = NULL; - catp = (LLViewerInventoryCategory*)gInventory.getCategory(mObjectID); - LLViewerInventoryItem* itemp = NULL; - if(!catp) - { - itemp = (LLViewerInventoryItem*)gInventory.getItem(mObjectID); - } std::string from_string; // Used in the pop-up. std::string chatHistory_string; // Used in chat history. -- cgit v1.2.3