From 21d0848f94c64b20fb7ceedd4ae7b71012a834d7 Mon Sep 17 00:00:00 2001 From: thickbrick Date: Sun, 6 Feb 2011 23:42:37 +0200 Subject: Fix #778: Textures get stuck half fetched. Make sure partial textures are cached as partial, so that they will finish fetching in consequent sessions. This is a rare case, but does happen. Backported from viewer2. --- linden/indra/newview/lltexturefetch.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 83a54e4..4b1a9cb 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -1116,6 +1116,17 @@ bool LLTextureFetchWorker::doWork(S32 param) return false; } S32 datasize = mFormattedImage->getDataSize(); + if(mFileSize < datasize)//This could happen when http fetching and sim fetching mixed. + { + if(mHaveAllData) + { + mFileSize = datasize ; + } + else + { + mFileSize = datasize + 1 ; //flag not fully loaded. + } + } llassert_always(datasize); setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it U32 cache_priority = mWorkPriority; -- cgit v1.1