summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-07-07 10:14:50 -0700
committerRichard Nelson <none@none>2010-07-07 10:14:50 -0700
commitca54ac338eabb2dc17f36550a25433ade4002f0e (patch)
tree5ef79a0b0c8d500d840b0b998d53af3fc3b87d8c /indra/newview
parentaef4f6ccabe0b2f72296f1a4ae5634080396690a (diff)
parentaa57d82043fd8d708dcd40d3253fdf2f6d067931 (diff)
merge
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagentwearablesfetch.cpp2
-rw-r--r--indra/newview/llviewerinventory.cpp15
-rw-r--r--indra/newview/llviewerinventory.h9
-rw-r--r--indra/newview/llvoavatar.h2
4 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 0a2f0e9399..d911d123f4 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -48,7 +48,7 @@ public:
virtual ~LLOrderMyOutfitsOnDestroy()
{
- if (LLApp::isExiting())
+ if (!LLApp::isRunning())
{
llwarns << "called during shutdown, skipping" << llendl;
return;
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 3430f265ae..2bf05d5907 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -839,6 +839,21 @@ LLInventoryCallbackManager::~LLInventoryCallbackManager()
sInstance = NULL;
}
+//static
+void LLInventoryCallbackManager::destroyClass()
+{
+ if (sInstance)
+ {
+ for (callback_map_t::iterator it = sInstance->mMap.begin(), end_it = sInstance->mMap.end(); it != end_it; ++it)
+ {
+ // drop LLPointer reference to callback
+ it->second = NULL;
+ }
+ sInstance->mMap.clear();
+ }
+}
+
+
U32 LLInventoryCallbackManager::registerCB(LLPointer<LLInventoryCallback> cb)
{
if (cb.isNull())
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index d0d3ad693e..dc3d3f7423 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -36,6 +36,7 @@
#include "llinventory.h"
#include "llframetimer.h"
#include "llwearable.h"
+#include "llui.h" //for LLDestroyClass
#include <boost/signals2.hpp> // boost::signals2::trackable
@@ -299,8 +300,9 @@ private:
// misc functions
//void inventory_reliable_callback(void**, S32 status);
-class LLInventoryCallbackManager
+class LLInventoryCallbackManager : public LLDestroyClass<LLInventoryCallbackManager>
{
+ friend LLDestroyClass<LLInventoryCallbackManager>;
public:
LLInventoryCallbackManager();
~LLInventoryCallbackManager();
@@ -308,9 +310,12 @@ public:
void fire(U32 callback_id, const LLUUID& item_id);
U32 registerCB(LLPointer<LLInventoryCallback> cb);
private:
- std::map<U32, LLPointer<LLInventoryCallback> > mMap;
+ typedef std::map<U32, LLPointer<LLInventoryCallback> > callback_map_t;
+ callback_map_t mMap;
U32 mLastCallback;
static LLInventoryCallbackManager *sInstance;
+ static void destroyClass();
+
public:
static bool is_instantiated() { return sInstance != NULL; }
};
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 3dad919875..dd7d0bb24d 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -868,7 +868,7 @@ private:
public:
// Responsible for detecting the user's voice signal (and when the
// user speaks, it puts a voice symbol over the avatar's head) and gesticulations
- LLVoiceVisualizer* mVoiceVisualizer;
+ LLPointer<LLVoiceVisualizer> mVoiceVisualizer;
int mCurrentGesticulationLevel;
//--------------------------------------------------------------------