diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-12 19:29:05 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-12 19:29:05 +0200 |
commit | d149b28173c2b255bd1bf1db902368dfbdf3064a (patch) | |
tree | d433c57f07aad0959519f8b88ccd1ed8447af7bf /indra/newview/lltexturecache.cpp | |
parent | 38115eb90b1760025ee299a167f6a9a2311f59ab (diff) | |
parent | 3b7ed8a4e9fdff83f89b49760d281ee5c13c8155 (diff) |
Merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 69a2d1d7a6..9be342c424 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1541,21 +1541,24 @@ bool LLTextureCache::readComplete(handle_t handle, bool abort) { lockWorkers(); handle_map_t::iterator iter = mReaders.find(handle); - llassert_always(iter != mReaders.end() || abort); - LLTextureCacheWorker* worker = iter->second; - bool res = worker->complete(); - if (res || abort) + LLTextureCacheWorker* worker = NULL; + bool complete = false; + if (iter != mReaders.end()) + { + worker = iter->second; + complete = worker->complete(); + } + if (worker && (complete || abort)) { - mReaders.erase(handle); + mReaders.erase(iter); unlockWorkers(); worker->scheduleDelete(); - return true; } else { unlockWorkers(); - return false; } + return (complete || abort); } LLTextureCache::handle_t LLTextureCache::writeToCache(const LLUUID& id, U32 priority, |