summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturecache.cpp
diff options
context:
space:
mode:
authorDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-12 19:29:05 +0200
committerDmitry Zaporozhan <dzaporozhan@productengine.com>2009-11-12 19:29:05 +0200
commitd149b28173c2b255bd1bf1db902368dfbdf3064a (patch)
treed433c57f07aad0959519f8b88ccd1ed8447af7bf /indra/newview/lltexturecache.cpp
parent38115eb90b1760025ee299a167f6a9a2311f59ab (diff)
parent3b7ed8a4e9fdff83f89b49760d281ee5c13c8155 (diff)
Merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r--indra/newview/lltexturecache.cpp17
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,