diff options
| author | Leslie Linden <leslie@lindenlab.com> | 2011-10-24 17:06:48 -0700 | 
|---|---|---|
| committer | Leslie Linden <leslie@lindenlab.com> | 2011-10-24 17:06:48 -0700 | 
| commit | 8874ac39c1928bcb70c4f63cd3cfaeb75712d00e (patch) | |
| tree | 1c62a7213d320b37e91232a407fb3a160271dc20 | |
| parent | c4387cbdb96a72bac7679f4268c492f808a354e6 (diff) | |
EXP-1462 FIX -- Moving speak button or voice settings button between toolbars can cause viewer to crash on Mac
* Updated iterator code to not erase stuff while we're iterating through it!
Reviewed by Richard.
| -rw-r--r-- | indra/newview/lltransientfloatermgr.cpp | 11 | 
1 files changed, 10 insertions, 1 deletions
| diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp index d15efb048b..3d68c10489 100644 --- a/indra/newview/lltransientfloatermgr.cpp +++ b/indra/newview/lltransientfloatermgr.cpp @@ -104,6 +104,8 @@ void LLTransientFloaterMgr::hideTransientFloaters(S32 x, S32 y)  bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set_t& set, S32 x, S32 y)  { +	std::list< LLHandle<LLView> > dead_handles; +	  	bool res = true;  	for (controls_set_t::iterator it = set.begin(); it  			!= set.end(); it++) @@ -113,7 +115,7 @@ bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set  		LLHandle<LLView> handle = *it;  		if (handle.isDead())  		{ -			mGroupControls.find(group)->second.erase(handle); +			dead_handles.push_back(handle);  			continue;  		} @@ -132,6 +134,13 @@ bool LLTransientFloaterMgr::isControlClicked(ETransientGroup group, controls_set  			break;  		}  	} + +	for (std::list< LLHandle<LLView> >::iterator it = dead_handles.begin(); it != dead_handles.end(); ++it) +	{ +		LLHandle<LLView> handle = *it; +		mGroupControls.find(group)->second.erase(handle); +	} +	  	return res;  } | 
