summaryrefslogtreecommitdiff
path: root/indra/newview/llaisapi.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-10-09 16:10:00 -0700
committerdolphin <dolphin@lindenlab.com>2014-10-09 16:10:00 -0700
commitf9113c286fae143962f1d79663e66a303c46ce51 (patch)
tree9190363e14749efdb3f46de02c67c377a0b9718e /indra/newview/llaisapi.cpp
parent873a72fdbad8bca29cf8129b318719c1af5f8e9d (diff)
parent788ce7a8cdbbbf98566ce75ec281ec00c21dc6d8 (diff)
Merge
Diffstat (limited to 'indra/newview/llaisapi.cpp')
-rwxr-xr-xindra/newview/llaisapi.cpp35
1 files changed, 28 insertions, 7 deletions
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index da66ea357a..96de15bf75 100755
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -380,8 +380,15 @@ void AISUpdate::parseMeta(const LLSD& update)
it != cat_ids.end(); ++it)
{
LLViewerInventoryCategory *cat = gInventory.getCategory(*it);
- mCatDescendentDeltas[cat->getParentUUID()]--;
- mObjectsDeletedIds.insert(*it);
+ if(cat)
+ {
+ mCatDescendentDeltas[cat->getParentUUID()]--;
+ mObjectsDeletedIds.insert(*it);
+ }
+ else
+ {
+ LL_WARNS("Inventory") << "removed category not found " << *it << LL_ENDL;
+ }
}
// parse _categories_items_removed -> mObjectsDeletedIds
@@ -392,8 +399,15 @@ void AISUpdate::parseMeta(const LLSD& update)
it != item_ids.end(); ++it)
{
LLViewerInventoryItem *item = gInventory.getItem(*it);
- mCatDescendentDeltas[item->getParentUUID()]--;
- mObjectsDeletedIds.insert(*it);
+ if(item)
+ {
+ mCatDescendentDeltas[item->getParentUUID()]--;
+ mObjectsDeletedIds.insert(*it);
+ }
+ else
+ {
+ LL_WARNS("Inventory") << "removed item not found " << *it << LL_ENDL;
+ }
}
// parse _broken_links_removed -> mObjectsDeletedIds
@@ -403,8 +417,15 @@ void AISUpdate::parseMeta(const LLSD& update)
it != broken_link_ids.end(); ++it)
{
LLViewerInventoryItem *item = gInventory.getItem(*it);
- mCatDescendentDeltas[item->getParentUUID()]--;
- mObjectsDeletedIds.insert(*it);
+ if(item)
+ {
+ mCatDescendentDeltas[item->getParentUUID()]--;
+ mObjectsDeletedIds.insert(*it);
+ }
+ else
+ {
+ LL_WARNS("Inventory") << "broken link not found " << *it << LL_ENDL;
+ }
}
// parse _created_items
@@ -795,7 +816,7 @@ void AISUpdate::doUpdate()
// Since this is a copy of the category *before* the accounting update, above,
// we need to transfer back the updated version/descendent count.
LLViewerInventoryCategory* curr_cat = gInventory.getCategory(new_category->getUUID());
- if (NULL == curr_cat)
+ if (!curr_cat)
{
LL_WARNS("Inventory") << "Failed to update unknown category " << new_category->getUUID() << LL_ENDL;
}