diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-09-05 15:36:32 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-09-05 15:36:32 -0400 |
commit | 0621810ab1060e615f7464b0b4d1407a5abf144d (patch) | |
tree | db461db24d4bcae9293d6167edb49955feb41bb1 /indra/newview/llaisapi.cpp | |
parent | deddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a (diff) | |
parent | c053dbe02c301b92c151eb835f6c770b61a46859 (diff) |
merge
Diffstat (limited to 'indra/newview/llaisapi.cpp')
-rwxr-xr-x | indra/newview/llaisapi.cpp | 35 |
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; } |