diff options
Diffstat (limited to 'indra/newview/llmaterialmgr.cpp')
-rw-r--r-- | indra/newview/llmaterialmgr.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index d74cc0c6ed..474e6b862e 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -494,6 +494,11 @@ void LLMaterialMgr::processGetQueue() material_queue_t& materials = itRegionQueue->second; material_queue_t::iterator loopMaterial = materials.begin(); + if (materials.end() == loopMaterial) + { + //LL_INFOS("Material") << "Get queue for region empty, trying next region." << LL_ENDL; + continue; + } while ( (materials.end() != loopMaterial) && (materialsData.size() <= MATERIALS_GET_MAX_ENTRIES) ) { material_queue_t::iterator itMaterial = loopMaterial++; @@ -612,14 +617,8 @@ void LLMaterialMgr::processPutQueue() std::string materialString = zip_llsd(materialsData); S32 materialSize = materialString.size(); - if (materialSize <= 0) - { - LL_ERRS("Materials") << "cannot zip LLSD binary content" << LL_ENDL; - mPutQueue.erase(itQueue); - continue; - } - else + if (materialSize > 0) { LLSD::Binary materialBinary; materialBinary.resize(materialSize); @@ -632,6 +631,11 @@ void LLMaterialMgr::processPutQueue() LLHTTPClient::ResponderPtr materialsResponder = new LLMaterialsResponder("PUT", capURL, boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2)); LLHTTPClient::put(capURL, putData, materialsResponder); } + else + { + LL_ERRS("debugMaterials") << "cannot zip LLSD binary content" << LL_ENDL; + } + mPutQueue.erase(itQueue); } } @@ -659,6 +663,5 @@ void LLMaterialMgr::onRegionRemoved(LLViewerRegion* regionp) mGetAllPending.erase(region_id); mGetAllCallbacks.erase(region_id); - // Put -// mPutQueue.erase(region_id); + // Put doesn't need clearing: objects that can't be found will clean up in processPutQueue() } |