summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2020-02-27 15:30:09 +0200
committermaxim_productengine <mnikolenko@productengine.com>2020-02-27 15:30:09 +0200
commit44f0cadad8f51e33d6af49d7ef3b3e175bd5b8b2 (patch)
tree8e5a665d77bafe666d872fbb7fabb766d738690d /indra/newview/llenvironment.cpp
parent735859c76ed7cfa0d5ceffb8dfc0230bf8de3d7d (diff)
SL-12739 FIXED [EEP] Viewer is crashed after clicking the "Forget" button on the Experience Profile after the llSetAgentEnvironment was used
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-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();)
{