diff options
-rw-r--r-- | indra/llmessage/llavatarnamecache.cpp | 4 |
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; |