diff options
author | Merov Linden <merov@lindenlab.com> | 2013-07-29 12:09:29 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-07-29 12:09:29 -0700 |
commit | bdd8005721c4030c91059a5b54c255648351a2f7 (patch) | |
tree | 1d004642c9a849ad26a287e12af1f10d30545806 /indra/llplugin/llplugincookiestore.cpp | |
parent | 9d42176e272dd345e60160d1614c9332bdd7f2cc (diff) |
ACME-755 : Fix erasing in live std::map (breaks build on Mac and Linux).
Diffstat (limited to 'indra/llplugin/llplugincookiestore.cpp')
-rwxr-xr-x | indra/llplugin/llplugincookiestore.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/llplugin/llplugincookiestore.cpp b/indra/llplugin/llplugincookiestore.cpp index 9ccd3a655b..9f4d65e723 100755 --- a/indra/llplugin/llplugincookiestore.cpp +++ b/indra/llplugin/llplugincookiestore.cpp @@ -679,12 +679,14 @@ void LLPluginCookieStore::removeCookiesByDomain(const std::string &domain) { if(iter->second->getDomain() == domain) { - delete iter->second; - iter = mCookies.erase(iter); - } - else - { - ++iter; + cookie_map_t::iterator doErase = iter; + iter++; + delete doErase->second; + mCookies.erase(doErase); } + else + { + iter++; + } } } |