From 923d486f58a105c9eb7404e3601ef17d2d7c0240 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 072af25..878c2fa 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -1113,6 +1113,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