From 7aa169bd1663c35b7a299091172c6fc7cc527966 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 11 Feb 2010 14:23:06 +0000 Subject: CID-151 Checker: NULL_RETURNS Function: LLFavoritesBarCtrl::insertBeforeItem(LLDynamicArray, (int)32> &, const LLUUID &, LLViewerInventoryItem *) File: /indra/newview/llfavoritesbar.cpp --- indra/newview/llfavoritesbar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfavoritesbar.cpp') 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 -- cgit v1.2.3