diff options
| author | Cho <cho@lindenlab.com> | 2013-01-15 02:48:52 +0000 | 
|---|---|---|
| committer | Cho <cho@lindenlab.com> | 2013-01-15 02:48:52 +0000 | 
| commit | b7f4916b3e4af149d6212a701c556915e23e7c0a (patch) | |
| tree | 1310d37b8806d25645201d5f29ec6b55569d82ff | |
| parent | cb82e865a02a32f2d4e207974ff9373a99ceec95 (diff) | |
CHUI-679 FIX Crash when script floater appears in CHUI viewer
LLPostponedNotification now inherits from LLMortician so it can postpone its deletion. This prevents a crash when looking up an avatar name in the case where the name already exists in the cache.
| -rw-r--r-- | indra/llui/llnotifications.cpp | 3 | ||||
| -rw-r--r-- | indra/llui/llnotifications.h | 5 | 
2 files changed, 5 insertions, 3 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index a5492b46f7..ea52bee184 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1852,6 +1852,7 @@ void LLPostponedNotification::fetchAvatarName(const LLUUID& id)  		{  			mAvatarNameCacheConnection.disconnect();  		} +  		mAvatarNameCacheConnection = LLAvatarNameCache::get(id, boost::bind(&LLPostponedNotification::onAvatarNameCache, this, _1, _2));  	}  } @@ -1860,7 +1861,7 @@ void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id,  												const LLAvatarName& av_name)  {  	mAvatarNameCacheConnection.disconnect(); -	 +  	std::string name = av_name.getCompleteName();  	// from PE merge - we should figure out if this is the right thing to do diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 236c2a42d1..e02c58de44 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -92,6 +92,7 @@  #include "llevents.h"  #include "llfunctorregistry.h"  #include "llinitparam.h" +#include "llmortician.h"  #include "llnotificationptr.h"  #include "llpointer.h"  #include "llrefcount.h" @@ -981,7 +982,7 @@ private:   *  1 create class derived from LLPostponedNotification;   *  2 call LLPostponedNotification::add method;   */ -class LLPostponedNotification +class LLPostponedNotification : public LLMortician  {  public:  	/** @@ -1014,7 +1015,7 @@ private:  	void cleanup()  	{ -		delete this; +		die();  	}  protected:  | 
