summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-27 13:15:13 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-27 13:15:13 -0800
commit3aed137a33712f9000333aa814f76183158183cb (patch)
treeb28355d5c9cd1fae66cba793441c0b96558c6e1d
parent599e96f32815733eb2bbd9aef5984d410644a10a (diff)
CID-101
Checker: INVALIDATE_ITERATOR Function: LLTextureCache::writeComplete(unsigned int, bool) File: /indra/newview/lltexturecache.cpp not really a bug, but rearranged a little.
-rw-r--r--indra/newview/lltexturecache.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 051c189013..7dfd0c83fa 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1617,20 +1617,19 @@ bool LLTextureCache::writeComplete(handle_t handle, bool abort)
{
lockWorkers();
handle_map_t::iterator iter = mWriters.find(handle);
- llassert_always(iter != mWriters.end());
- LLTextureCacheWorker* worker = iter->second;
- if (worker->complete() || abort)
+ if (llverify(iter != mWriters.end()))
{
- mWriters.erase(handle);
- unlockWorkers();
- worker->scheduleDelete();
- return true;
- }
- else
- {
- unlockWorkers();
- return false;
+ LLTextureCacheWorker* worker = iter->second;
+ if (worker->complete() || abort)
+ {
+ mWriters.erase(handle);
+ unlockWorkers();
+ worker->scheduleDelete();
+ return true;
+ }
}
+ unlockWorkers();
+ return false;
}
void LLTextureCache::prioritizeWrite(handle_t handle)