diff options
author | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-02 17:28:58 +0000 |
---|---|---|
committer | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-02 17:28:58 +0000 |
commit | 305c74d5163c5e344a675d39ca2394a9e45bd2c2 (patch) | |
tree | 42836c4a6010b2b015156024d3cfb6bf64a48ad6 /indra/newview/lltexturefetch.cpp | |
parent | 54d89549df38bb61881583a3eb8d3645c107d79f (diff) |
Result of svn merge -r57264:57370 svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release.
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index cc27fd4b9e..75777024da 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -530,7 +530,7 @@ bool LLTextureFetchWorker::startVFSLoad(LLVFS* vfs, LLAssetType::EType asset_typ { mBufferSize = vfs->getSize(mID, asset_type); mBuffer = new U8[mBufferSize]; - mFileHandle = LLVFSThread::sLocal->read(vfs, mID, asset_type, mBuffer, 0, mBufferSize); + mFileHandle = LLVFSThread::sLocal->read(vfs, mID, asset_type, mBuffer, 0, mBufferSize); /* Flawfinder: ignore */ if (mFileHandle == LLVFSThread::nullHandle()) { llwarns << "loadLocalImage() - vfs read failed in static VFS: " << mID << llendl; @@ -612,8 +612,11 @@ bool LLTextureFetchWorker::processSimulatorPackets() S32 offset = 0; for (S32 i = 0; i<=mLastPacket; i++) { - memcpy(mBuffer + offset, mPackets[i]->mData, mPackets[i]->mSize); - offset += mPackets[i]->mSize; + if (mPackets[i]->mData != NULL) + { + memcpy(mBuffer + offset, mPackets[i]->mData, mPackets[i]->mSize); /* Flawfinder: ignore */ + offset += mPackets[i]->mSize; + } } res = true; } |