fix for EXT-6928: Viewer crashes immediately after enabling HTTP Textures on a http-texture-server-1 simulator

and EXT-7009: textures fetched through http are never cached.
meow-7.2.2
Xiaohong Bao 2010-04-22 14:27:14 -06:00
parent 3d31363000
commit 1eebca1431
1 changed files with 6 additions and 0 deletions

View File

@ -850,6 +850,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mState = WAIT_HTTP_REQ;
mFetcher->addToHTTPQueue(mID);
mSentRequest = QUEUED;
// Will call callbackHttpGet when curl request completes
std::vector<std::string> headers;
headers.push_back("Accept: image/x-j2c");
@ -936,6 +937,11 @@ bool LLTextureFetchWorker::doWork(S32 param)
{
mFileSize = mBufferSize;
}
else //the file size is unknown
{
mFileSize = S32_MAX ; //flag the file is not fully loaded.
}
U8* buffer = new U8[mBufferSize];
if (cur_size > 0)
{