summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llenvironment.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 8f778711ce..b8c5648cca 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -397,8 +397,8 @@ namespace
void removeInjection(const std::string keyname, LLUUID experience, LLSettingsBase::Seconds transition)
{
- auto it = mInjections.begin();
- while (it != mInjections.end())
+ injections_t injections_buf;
+ for (auto it = mInjections.begin(); it != mInjections.end(); it++)
{
if ((keyname.empty() || ((*it)->mKeyName == keyname)) &&
(experience.isNull() || (experience == (*it)->mExperience)))
@@ -406,13 +406,16 @@ namespace
if (transition != LLEnvironment::TRANSITION_INSTANT)
{
typename Injection::ptr_t injection = std::make_shared<Injection>(transition, keyname, (*it)->mLastValue, false, LLUUID::null);
- mInjections.push_front(injection); // push them in at the front so we don't check them again.
+ injections_buf.push_front(injection);
}
- mInjections.erase(it++);
}
else
- ++it;
+ {
+ injections_buf.push_front(*it);
+ }
}
+ mInjections.clear();
+ mInjections = injections_buf;
for (auto itexp = mOverrideExps.begin(); itexp != mOverrideExps.end();)
{