diff options
| author | Richard Nelson <none@none> | 2010-06-25 14:57:42 -0700 |
|---|---|---|
| committer | Richard Nelson <none@none> | 2010-06-25 14:57:42 -0700 |
| commit | 3fc3773ab848ff7fcfcb40c61e211ee13592f418 (patch) | |
| tree | 60ef6e10f21fd36e9f451ea0b7a01cfdbe91aef7 /indra/newview/llviewerinventory.h | |
| parent | 1b9c357bc34ff3c52aaaaeff7c4503cce747ce7a (diff) | |
EXT-7991 FIX Crash if exit before outfit autopopulate completes
reviewed by Leyla
Diffstat (limited to 'indra/newview/llviewerinventory.h')
| -rw-r--r-- | indra/newview/llviewerinventory.h | 9 |
1 files changed, 7 insertions, 2 deletions
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; } }; |
