diff options
Diffstat (limited to 'linden/indra/newview/lltexturecache.cpp')
-rw-r--r-- | linden/indra/newview/lltexturecache.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index 46c125f..0c35b32 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp | |||
@@ -372,9 +372,10 @@ bool LLTextureCacheRemoteWorker::doRead() | |||
372 | if (!done && (mState == LOCAL)) | 372 | if (!done && (mState == LOCAL)) |
373 | { | 373 | { |
374 | llassert(local_size != 0); // we're assuming there is a non empty local file here... | 374 | llassert(local_size != 0); // we're assuming there is a non empty local file here... |
375 | if (!mDataSize || mDataSize > local_size) | 375 | llassert(mReadData == NULL); |
376 | if (!mDataSize || mDataSize > (local_size - mOffset)) | ||
376 | { | 377 | { |
377 | mDataSize = local_size; | 378 | mDataSize = local_size - mOffset; |
378 | } | 379 | } |
379 | // Allocate read buffer | 380 | // Allocate read buffer |
380 | mReadData = new U8[mDataSize]; | 381 | mReadData = new U8[mDataSize]; |