diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-12 16:30:02 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-12 16:30:02 +0200 |
commit | e4ad08dcfca251dd954576d8f16a77afcdb2e2b9 (patch) | |
tree | d37b04cf5598b4891ff65b0fb97c793810a37120 /indra/newview/lltexturecache.cpp | |
parent | 047eb379673596bcc3167f399187e2c5f565dbcb (diff) | |
parent | 95adfa4cacb68e21b7251882feffbc7cb50b4438 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 6a4b967487..9be342c424 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1541,23 +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; - if (!worker) - return false; - bool res = worker->complete(); - if (res || abort) + LLTextureCacheWorker* worker = NULL; + bool complete = false; + if (iter != mReaders.end()) { - mReaders.erase(handle); + worker = iter->second; + complete = worker->complete(); + } + if (worker && (complete || abort)) + { + 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, |