summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorSteve Bennetts <steve@lindenlab.com>2009-11-12 00:10:29 -0800
committerSteve Bennetts <steve@lindenlab.com>2009-11-12 00:10:29 -0800
commit6524295bf06f58fad84dc7251f6ba3fd81ce94f2 (patch)
tree597947703c40f65da9d424f1efbfa9637c2828d1 /indra
parentf936f661bc5d8c3d254389cc7b775bf5d6a0ff2e (diff)
parenta7fa9c49366dc1d22ee7aeea21c26cd40f2bc7f0 (diff)
merge
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltexturecache.cpp19
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,