diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-27 13:15:13 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-27 13:15:13 -0800 |
commit | 3aed137a33712f9000333aa814f76183158183cb (patch) | |
tree | b28355d5c9cd1fae66cba793441c0b96558c6e1d /indra | |
parent | 599e96f32815733eb2bbd9aef5984d410644a10a (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.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 23 |
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) |