summaryrefslogtreecommitdiff
path: root/indra/llmessage/llavatarnamecache.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-04-28 19:04:08 -0700
committerRichard Linden <none@none>2011-04-28 19:04:08 -0700
commit6e5794376d5b64dffd965265d484e67346e02f31 (patch)
tree874608a5521e742b4def0b5eccee3177158fe059 /indra/llmessage/llavatarnamecache.cpp
parentc14d9b6e5f3fb52d1c8e743c5d28d212551458a1 (diff)
STORM-1039 FIXED Bad iterator access in llavatarnamecache.cpp:564
fixed crash on startup
Diffstat (limited to 'indra/llmessage/llavatarnamecache.cpp')
-rw-r--r--indra/llmessage/llavatarnamecache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 33e6709983..e0b77e3105 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -554,7 +554,7 @@ void LLAvatarNameCache::eraseUnrefreshed()
{
sLastExpireCheck = now;
- for (cache_t::iterator it = sCache.begin(); it != sCache.end(); ++it)
+ for (cache_t::iterator it = sCache.begin(); it != sCache.end();)
{
const LLAvatarName& av_name = it->second;
if (av_name.mExpires < max_unrefreshed)
@@ -564,7 +564,7 @@ void LLAvatarNameCache::eraseUnrefreshed()
<< " user '" << av_name.mUsername << "' "
<< "expired " << now - av_name.mExpires << " secs ago"
<< LL_ENDL;
- sCache.erase(it);
+ sCache.erase(it++);
}
}
LL_INFOS("AvNameCache") << sCache.size() << " cached avatar names" << LL_ENDL;