From 0a3a986dabfd8655e1c4e2925a2252619afbc467 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 23 Jun 2010 22:01:41 -0700 Subject: Applied patch by Thickbrick Sleaford for SNOW-698: Crash when http-getting an empty texture: ERROR: doWork: ASSERT (mFormattedImage->getDataSize() > 0) --- linden/indra/newview/lltexturefetch.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index ebb0ee4..326a1b6 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -1224,14 +1224,22 @@ void LLTextureFetchWorker::callbackHttpGet(const LLChannelDescriptors& channels, mFormattedImage = NULL; // discard any previous data we had mBufferSize = data_size; } + mRequestedSize = data_size; } else { // We requested data but received none (and no error), - // so presumably we have all of it - mHaveAllData = TRUE; + if (mFormattedImage.notNull() && mFormattedImage->getDataSize() > 0) + { + // but have earlier data, so presumably we have it all. + mRequestedSize = 0; + mHaveAllData = TRUE; + } + else + { + mRequestedSize = -1; // treat this fetch as if it failed. + } } - mRequestedSize = data_size; } else { -- cgit v1.1