summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-04-27 14:27:48 -0600
committerXiaohong Bao <bao@lindenlab.com>2012-04-27 14:27:48 -0600
commit9c4380a03a7b9d18cdd44662ca56cf44c4766e6f (patch)
tree48626d5f900c029ce0205f38b17c5aa845a1c06d /indra
parented78cc00008b13e4a108635e851b9936688647d0 (diff)
fix a crash on cache write
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/lltexturefetch.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index f2d8c27db7..59a125dcc5 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -3386,10 +3386,13 @@ void LLTextureFetchDebugger::debugCacheWrite()
S32 size = mFetchingHistory.size();
for(S32 i = 0 ; i < size ; i++)
{
- mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL,
- mFetchingHistory[i].mFormattedImage->getData(), mFetchingHistory[i].mFetchedSize,
- mFetchingHistory[i].mDecodedLevel == 0 ? mFetchingHistory[i].mFetchedSize : mFetchingHistory[i].mFetchedSize + 1,
- new LLDebuggerCacheWriteResponder(this, i));
+ if(mFetchingHistory[i].mFormattedImage.notNull())
+ {
+ mFetchingHistory[i].mCacheHandle = mTextureCache->writeToCache(mFetchingHistory[i].mID, LLWorkerThread::PRIORITY_NORMAL,
+ mFetchingHistory[i].mFormattedImage->getData(), mFetchingHistory[i].mFetchedSize,
+ mFetchingHistory[i].mDecodedLevel == 0 ? mFetchingHistory[i].mFetchedSize : mFetchingHistory[i].mFetchedSize + 1,
+ new LLDebuggerCacheWriteResponder(this, i));
+ }
}
}