diff options
author | Kitty Barnett <develop@catznip.com> | 2012-12-12 21:47:24 +0100 |
---|---|---|
committer | Kitty Barnett <develop@catznip.com> | 2012-12-12 21:47:24 +0100 |
commit | a18ea9d92923e331c0a3e179e126659e694b1c07 (patch) | |
tree | ac82c05ccab33639a24bd661e8edf602d7912bb4 /indra/newview/llmaterialmgr.cpp | |
parent | ef301c59832025240a20f9959008a33dc52233f9 (diff) |
Clean up pending requests when regions are removed from LLWorld
Diffstat (limited to 'indra/newview/llmaterialmgr.cpp')
-rw-r--r-- | indra/newview/llmaterialmgr.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index f623ca11ec..1daeedb8b0 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -112,6 +112,7 @@ void LLMaterialsResponder::error(U32 pStatus, const std::string& pReason) LLMaterialMgr::LLMaterialMgr() { gIdleCallbacks.addFunction(&LLMaterialMgr::onIdle, NULL); + LLWorld::instance().setRegionRemovedCallback(boost::bind(&LLMaterialMgr::onRegionRemoved, this, _1)); } LLMaterialMgr::~LLMaterialMgr() @@ -607,3 +608,27 @@ void LLMaterialMgr::processPutQueue() } } } + +void LLMaterialMgr::onRegionRemoved(LLViewerRegion* regionp) +{ + const LLUUID& region_id = regionp->getRegionID(); + + // Get + mGetQueue.erase(region_id); + for (get_pending_map_t::const_iterator itPending = mGetPending.begin(); itPending != mGetPending.end();) + { + if (region_id == itPending->first.first) + mGetPending.erase(itPending++); + else + ++itPending; + } + + // Get all + mGetAllQueue.erase(region_id); + mGetAllRequested.erase(region_id); + mGetAllPending.erase(region_id); + mGetAllCallbacks.erase(region_id); + + // Put +// mPutQueue.erase(region_id); +} |