diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 30 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 3 |
2 files changed, 26 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); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5f66e6b409..9ee848e30f 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -68,6 +68,7 @@ #include "llviewermedia.h" #include "llvoavatarself.h" #include "llviewermediafocus.h" +#include "llvovolume.h" #include "llworld.h" #include "llui.h" #include "llweb.h" @@ -629,12 +630,14 @@ static bool needs_tooltip(LLSelectNode* nodep) return false; LLViewerObject* object = nodep->getObject(); + LLVOVolume* vovolume = dynamic_cast<LLVOVolume*>(object); LLViewerObject *parent = (LLViewerObject *)object->getParent(); if (object->flagHandleTouch() || (parent && parent->flagHandleTouch()) || object->flagTakesMoney() || (parent && parent->flagTakesMoney()) || object->flagAllowInventoryAdd() + || (vovolume && vovolume->hasMedia()) ) { return true; |