summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-11 14:23:06 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-11 14:23:06 +0000
commit7aa169bd1663c35b7a299091172c6fc7cc527966 (patch)
tree3e2df5e4a3c91df281063717c43f35717118a449 /indra/newview
parenta1e2ce7fa29be3faca8e58d8df25ea05dcb8a4a5 (diff)
CID-151
Checker: NULL_RETURNS Function: LLFavoritesBarCtrl::insertBeforeItem(LLDynamicArray<LLPointer<LLViewerInventoryItem>, (int)32> &, const LLUUID &, LLViewerInventoryItem *) File: /indra/newview/llfavoritesbar.cpp
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfavoritesbar.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 1e8a739d78..bf7c735488 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -1264,8 +1264,11 @@ LLInventoryModel::item_array_t::iterator LLFavoritesBarCtrl::findItemByUUID(LLIn
void LLFavoritesBarCtrl::insertBeforeItem(LLInventoryModel::item_array_t& items, const LLUUID& beforeItemId, LLViewerInventoryItem* insertedItem)
{
LLViewerInventoryItem* beforeItem = gInventory.getItem(beforeItemId);
-
- items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem);
+ llassert(beforeItem);
+ if (beforeItem)
+ {
+ items.insert(findItemByUUID(items, beforeItem->getUUID()), insertedItem);
+ }
}
// EOF