diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp index 801b3715a9..26931bcb42 100644 --- a/indra/llmessage/llurlrequest.cpp +++ b/indra/llmessage/llurlrequest.cpp @@ -84,8 +84,15 @@ LLURLRequestDetail::LLURLRequestDetail() : LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mCurlRequest = new LLCurlEasyRequest(); + if(!mCurlRequest) + { + lldebugs << "failed to allocate new curl request." << llendl; + return; + } + if(!mCurlRequest->isValid()) //failed. { + lldebugs << "new curl request is not valid." << llendl; delete mCurlRequest ; mCurlRequest = NULL ; } @@ -269,7 +276,7 @@ void LLURLRequest::setModifiedSince(const time_t &if_modified_since) //virtual bool LLURLRequest::isValid() { - return mDetail->mCurlRequest && mDetail->mCurlRequest->isValid(); + return mDetail && mDetail->mCurlRequest && mDetail->mCurlRequest->isValid(); } // virtual @@ -469,6 +476,18 @@ void LLURLRequest::initialize() LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST); mState = STATE_INITIALIZED; mDetail = new LLURLRequestDetail; + if(!mDetail) + { + lldebugs << "LLURLRequestDetail() failed." << llendl; + return; + } + + if(!mDetail->mCurlRequest) + { + lldebugs << "mCurlRequest==0!" << llendl; + return; + } + mDetail->mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); mDetail->mCurlRequest->setWriteCallback(&downCallback, (void*)this); mDetail->mCurlRequest->setReadCallback(&upCallback, (void*)this); diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h index 4772fd5088..d973a7b5b6 100644 --- a/indra/newview/llvovolume.h +++ b/indra/newview/llvovolume.h @@ -131,6 +131,7 @@ public: /*virtual*/ const LLMatrix4 getRenderMatrix() const; typedef std::map texture_cost_t; U32 getRenderCost(texture_cost_t &textures) const; + F32 getStreamingCost(S32* bytes, S32* visible_bytes, F32* unscaled_value) const; /*virtual*/ F32 getStreamingCost(S32* bytes = NULL, S32* visible_bytes = NULL) { return getStreamingCost(bytes, visible_bytes, NULL); }