From b6446cad10508dfee32e68e47cbaed0d93cf6dbd Mon Sep 17 00:00:00 2001 From: Shyotl Date: Thu, 12 May 2011 16:13:04 -0500 Subject: [PATCH] A stability and leak fix regarding editing physics wearables. Thanks Henri! --- indra/newview/llfloatercustomize.cpp | 14 +++++++++----- indra/newview/llfloatercustomize.h | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/indra/newview/llfloatercustomize.cpp b/indra/newview/llfloatercustomize.cpp index 6a313c2bd..3d1413c60 100644 --- a/indra/newview/llfloatercustomize.cpp +++ b/indra/newview/llfloatercustomize.cpp @@ -1386,14 +1386,18 @@ LLScrollingPanelParam::LLScrollingPanelParam( const std::string& name, else { //Kill everything that isn't the slider... - for(child_list_t::const_iterator it = getChildList()->begin();it!=getChildList()->end();) + child_list_t to_remove; + child_list_t::const_iterator it; + for (it = getChildList()->begin(); it != getChildList()->end(); it++) { - if((*it)!=slider && (*it)->getName() != "panel border") + if ((*it) != slider && (*it)->getName() != "panel border") { - llinfos << "removing: " << (*it)->getName() << llendl; - removeChild((*(it++)),TRUE); + to_remove.push_back(*it); } - else ++it; + } + for (it = to_remove.begin(); it != to_remove.end(); it++) + { + removeChild(*it, TRUE); } slider->translate(0,PARAM_HINT_HEIGHT); reshape(getRect().getWidth(),getRect().getHeight()-PARAM_HINT_HEIGHT); diff --git a/indra/newview/llfloatercustomize.h b/indra/newview/llfloatercustomize.h index ceb49af01..1b4bed74d 100644 --- a/indra/newview/llfloatercustomize.h +++ b/indra/newview/llfloatercustomize.h @@ -128,7 +128,7 @@ protected: LLScrollingPanelList* mScrollingPanelList; LLScrollableContainerView* mScrollContainer; - LLVisualParamReset* mResetParams; + LLPointer mResetParams; LLInventoryObserver* mInventoryObserver;