Commits

Anonymous committed 3bc1f50

CHOP-240 Fix for incorrect use of std:multimap iterators. Rev. by Alain.

  • Participants
  • Parent commits dc64834
  • Tags 2.4.0-beta1, DRTVWR-26_2.4.0-beta1

Comments (0)

Files changed (1)

File indra/newview/llremoteparcelrequest.cpp

 void LLRemoteParcelInfoProcessor::addObserver(const LLUUID& parcel_id, LLRemoteParcelInfoObserver* observer)
 {
 	observer_multimap_t::iterator it;
+	observer_multimap_t::iterator start = mObservers.lower_bound(parcel_id);
 	observer_multimap_t::iterator end = mObservers.upper_bound(parcel_id);
 
 	// Check if the observer is already in observers list for this UUID
-	for(it = mObservers.find(parcel_id); it != end; ++it)
+	for(it = start; it != end; ++it)
 	{
 		if (it->second.get() == observer)
 		{
 	}
 
 	observer_multimap_t::iterator it;
+	observer_multimap_t::iterator start = mObservers.lower_bound(parcel_id);
 	observer_multimap_t::iterator end = mObservers.upper_bound(parcel_id);
 
-	for(it = mObservers.find(parcel_id); it != end; ++it)
+	for(it = start; it != end; ++it)
 	{
 		if (it->second.get() == observer)
 		{
 	deadlist_t dead_iters;
 
 	observer_multimap_t::iterator oi;
+	observer_multimap_t::iterator start = observers.lower_bound(parcel_data.parcel_id);
 	observer_multimap_t::iterator end = observers.upper_bound(parcel_data.parcel_id);
 
-	for (oi = observers.find(parcel_data.parcel_id); oi != end; ++oi)
+	for (oi = start; oi != end; ++oi)
 	{
 		LLRemoteParcelInfoObserver * observer = oi->second.get();
 		if(observer)