summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 80ac9e4085..a23d21f84b 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -95,8 +95,9 @@ public:
mCopyItems(copy_items),
mAppend(append)
{}
- ~LLOutfitObserver() {}
- virtual void done(); //public
+ ~LLOutfitObserver();
+ virtual void done();
+ void doWearCategory();
protected:
LLUUID mCatID;
@@ -104,8 +105,20 @@ protected:
bool mAppend;
};
+LLOutfitObserver::~LLOutfitObserver()
+{
+ llinfos << "~LLOutfitObserver" << llendl;
+}
+
+// BAP is LLOutfitObserver getting deleted here?
void LLOutfitObserver::done()
{
+ gInventory.removeObserver(this);
+ doOnIdle(boost::bind(&LLOutfitObserver::doWearCategory,this));
+}
+
+void LLOutfitObserver::doWearCategory()
+{
// We now have an outfit ready to be copied to agent inventory. Do
// it, and wear that outfit normally.
if(mCopyItems)
@@ -175,6 +188,7 @@ void LLOutfitObserver::done()
// Wear the inventory category.
LLAppearanceManager::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend);
}
+ delete this;
}
class LLOutfitFetch : public LLInventoryFetchDescendentsObserver