meow-7.2.2
Richard Nelson 2010-07-02 10:35:52 -07:00
commit aa57d82043
4 changed files with 24 additions and 4 deletions

View File

@ -48,7 +48,7 @@ public:
virtual ~LLOrderMyOutfitsOnDestroy()
{
if (LLApp::isExiting())
if (!LLApp::isRunning())
{
llwarns << "called during shutdown, skipping" << llendl;
return;

View File

@ -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())

View File

@ -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; }
};

View File

@ -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;
//--------------------------------------------------------------------