diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-01-06 15:10:00 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-01-06 15:10:00 -0500 |
commit | 703694d1da6c413947657f43c1e61f7065b5101f (patch) | |
tree | 655b5669df536eb6848aaa8ec4a446935775ff4c /indra | |
parent | d9b8f65c03130f659ed0d036a9c542700a84b766 (diff) |
For EXT-3812: Inventory Loss between 1.23 to 2.0 logins. One possible cause is broken links, which this fix will detect earlier, avoiding a needlessly alarming message
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 25f1accb22..1150d84feb 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -723,14 +723,30 @@ void LLAppearanceManager::updateAppearanceFromCOF() LLDynamicArray<LLFoundData*> found_container; for(S32 i = 0; i < wear_items.count(); ++i) { - found = new LLFoundData(wear_items.get(i)->getLinkedUUID(), // Wear the base item, not the link - wear_items.get(i)->getAssetUUID(), - wear_items.get(i)->getName(), - wear_items.get(i)->getType()); - holder->mFoundList.push_front(found); - found_container.put(found); + LLViewerInventoryItem *item = wear_items.get(i); + LLViewerInventoryItem *linked_item = item ? item->getLinkedItem() : NULL; + if (item && linked_item) + { + found = new LLFoundData(linked_item->getUUID(), + linked_item->getAssetUUID(), + linked_item->getName(), + linked_item->getType()); + holder->mFoundList.push_front(found); + found_container.put(found); + } + else + { + if (!item) + { + llwarns << "attempt to wear a null item " << llendl; + } + else if (!linked_item) + { + llwarns << "attempt to wear a broken link " << item->getName() << llendl; + } + } } - for(S32 i = 0; i < wear_items.count(); ++i) + for(S32 i = 0; i < found_container.count(); ++i) { holder->append = false; found = found_container.get(i); |