summaryrefslogtreecommitdiff
path: root/indra/newview/llaisapi.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2014-09-22 18:51:19 -0400
committerMonty Brandenberg <monty@lindenlab.com>2014-09-22 18:51:19 -0400
commit620817c1c3368d73f1b47b1593a0bcbcf567e297 (patch)
treee37b76dc8d154ab661ab23e6be2b6b098f97e4b2 /indra/newview/llaisapi.cpp
parent329608d24668b044e16b54ff7a7d0ac592b2b88d (diff)
parent8897e7ca24533e0093825346391f5fa9a37f2427 (diff)
Merge. Refresh from viewer-drano-http-4 after release of 3.7.16.
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;
}