diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-06-29 09:49:49 -0400 | 
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-06-29 09:49:49 -0400 | 
| commit | 04fbb862ddb5871774435b4c4988193731b62a88 (patch) | |
| tree | 6ba1b7df73b8be8080e27210034e444d32abc983 | |
| parent | 3bc99274f19ce0cbc3e600c0010655e2778ab405 (diff) | |
| parent | d95cc1712f1fd9eb0ab06534b54be9e5449f66ba (diff) | |
merge changes for storm-1352
| -rw-r--r-- | indra/newview/llnearbychathandler.cpp | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 11dc496311..68c8d5854e 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -268,6 +268,9 @@ bool	LLNearbyChatScreenChannel::createPoolToast()  	toast->setOnFadeCallback(boost::bind(&LLNearbyChatScreenChannel::onToastFade, this, _1)); +	// If the toast gets somehow prematurely destroyed, deactivate it to prevent crash (STORM-1352). +	toast->setOnToastDestroyedCallback(boost::bind(&LLNearbyChatScreenChannel::onToastDestroyed, this, _1, false)); +  	LL_DEBUGS("NearbyChat") << "Creating and pooling toast" << llendl;	  	m_toast_pool.push_back(toast->getHandle());  	return true; @@ -369,8 +372,10 @@ void LLNearbyChatScreenChannel::arrangeToasts()  	}  } -int sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> second) +static bool sort_toasts_predicate(LLHandle<LLToast> first, LLHandle<LLToast> second)  { +	if (!first.get() || !second.get()) return false; // STORM-1352 +  	F32 v1 = first.get()->getTimeLeftToLive();  	F32 v2 = second.get()->getTimeLeftToLive();  	return v1 > v2; @@ -396,7 +401,11 @@ void LLNearbyChatScreenChannel::showToastsBottom()  	for(toast_vec_t::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it)  	{  		LLToast* toast = it->get(); -		if (!toast) continue; +		if (!toast) +		{ +			llwarns << "NULL found in the active chat toasts list!" << llendl; +			continue; +		}  		S32 toast_top = bottom + toast->getRect().getHeight() + margin;  | 
