summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-13 14:04:26 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-13 14:04:26 +0000
commit74ffa0fa480e57371acd992fce7f291f04456729 (patch)
tree3d94c0d4a7a1f133b4a80aa9c94051fb17e05f79 /indra
parent3ac37e9b896e19b6c7ba24aa038d49551c5add38 (diff)
CID-207
Checker: REVERSE_INULL Function: LLInventoryModel::addItem(LLViewerInventoryItem *) File: /indra/newview/llinventorymodel.cpp
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorymodel.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 7ec976604a..a6e8f07e21 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1937,23 +1937,25 @@ void LLInventoryModel::addItem(LLViewerInventoryItem* item)
{
//llinfos << "LLInventoryModel::addItem()" << llendl;
- // This can happen if assettype enums from llassettype.h ever change.
- // For example, there is a known backwards compatibility issue in some viewer prototypes prior to when
- // the AT_LINK enum changed from 23 to 24.
- if ((item->getType() == LLAssetType::AT_NONE)
- || LLAssetType::lookup(item->getType()) == LLAssetType::badLookup())
- {
- llwarns << "Got bad asset type for item [ name: " << item->getName() << " type: " << item->getType() << " inv-type: " << item->getInventoryType() << " ], ignoring." << llendl;
- return;
- }
if(item)
{
+ // This can happen if assettype enums from llassettype.h ever change.
+ // For example, there is a known backwards compatibility issue in some viewer prototypes prior to when
+ // the AT_LINK enum changed from 23 to 24.
+ if ((item->getType() == LLAssetType::AT_NONE)
+ || LLAssetType::lookup(item->getType()) == LLAssetType::badLookup())
+ {
+ llwarns << "Got bad asset type for item [ name: " << item->getName() << " type: " << item->getType() << " inv-type: " << item->getInventoryType() << " ], ignoring." << llendl;
+ return;
+ }
+
// This condition means that we tried to add a link without the baseobj being in memory.
// The item will show up as a broken link.
if (item->getIsBrokenLink())
{
llinfos << "Adding broken link [ name: " << item->getName() << " itemID: " << item->getUUID() << " assetID: " << item->getAssetUUID() << " ) parent: " << item->getParentUUID() << llendl;
}
+
mItemMap[item->getUUID()] = item;
}
}