aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/lltexturefetch.cpp')
-rw-r--r--linden/indra/newview/lltexturefetch.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp
index 2e4283b..e412dfe 100644
--- a/linden/indra/newview/lltexturefetch.cpp
+++ b/linden/indra/newview/lltexturefetch.cpp
@@ -48,7 +48,6 @@
48#include "llviewerregion.h" 48#include "llviewerregion.h"
49 49
50////////////////////////////////////////////////////////////////////////////// 50//////////////////////////////////////////////////////////////////////////////
51
52//static 51//static
53class LLTextureFetchWorker : public LLWorkerClass 52class LLTextureFetchWorker : public LLWorkerClass
54{ 53{
@@ -435,6 +434,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
435 434
436LLTextureFetchWorker::~LLTextureFetchWorker() 435LLTextureFetchWorker::~LLTextureFetchWorker()
437{ 436{
437 llassert_always(LLWorkerClass::sDeleteLock) ;
438// llinfos << "Destroy: " << mID 438// llinfos << "Destroy: " << mID
439// << " Decoded=" << mDecodedDiscard 439// << " Decoded=" << mDecodedDiscard
440// << " Requested=" << mRequestedDiscard 440// << " Requested=" << mRequestedDiscard
@@ -1052,9 +1052,11 @@ bool LLTextureFetchWorker::processSimulatorPackets()
1052{ 1052{
1053 if (mLastPacket >= mFirstPacket) 1053 if (mLastPacket >= mFirstPacket)
1054 { 1054 {
1055 llassert_always(mFormattedImage) ;
1055 S32 buffer_size = mFormattedImage->getDataSize(); 1056 S32 buffer_size = mFormattedImage->getDataSize();
1056 for (S32 i = mFirstPacket; i<=mLastPacket; i++) 1057 for (S32 i = mFirstPacket; i<=mLastPacket; i++)
1057 { 1058 {
1059 llassert_always(mPackets[i]) ;
1058 buffer_size += mPackets[i]->mSize; 1060 buffer_size += mPackets[i]->mSize;
1059 } 1061 }
1060 bool have_all_data = mLastPacket >= mTotalPackets-1; 1062 bool have_all_data = mLastPacket >= mTotalPackets-1;
@@ -1436,13 +1438,16 @@ void LLTextureFetch::removeFromNetworkQueue(LLTextureFetchWorker* worker)
1436// call lockQueue() first! 1438// call lockQueue() first!
1437void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel) 1439void LLTextureFetch::removeRequest(LLTextureFetchWorker* worker, bool cancel)
1438{ 1440{
1439 mRequestMap.erase(worker->mID); 1441 size_t erased_1 = mRequestMap.erase(worker->mID);
1442 llassert_always(erased_1 > 0) ;
1440 size_t erased = mNetworkQueue.erase(worker->mID); 1443 size_t erased = mNetworkQueue.erase(worker->mID);
1441 if (cancel && erased > 0) 1444 if (cancel && erased > 0)
1442 { 1445 {
1443 mCancelQueue[worker->mHost].insert(worker->mID); 1446 mCancelQueue[worker->mHost].insert(worker->mID);
1444 } 1447 }
1445 worker->scheduleDelete(); 1448 llassert_always(!(worker->getFlags(LLWorkerClass::WCF_DELETE_REQUESTED))) ;
1449
1450 worker->scheduleDelete();
1446} 1451}
1447 1452
1448// call lockQueue() first! 1453// call lockQueue() first!