EXT-8082 FIXED Fixed viewer crash in outfit list accordion.

Details:
1 Avoided memory leak of LLAccordionCtrlTab in LLOutfitsList::refreshList method.
2 Provided resetting selection in LLAccordionCtrl::removeCollapsibleCtrl method.

reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/701/

--HG--
branch : product-engine
master
Alexei Arabadji 2010-07-06 17:00:39 +03:00
parent 6e252a3568
commit a03e123148
2 changed files with 18 additions and 0 deletions

View File

@ -374,6 +374,12 @@ void LLAccordionCtrl::removeCollapsibleCtrl(LLView* view)
break;
}
}
// if removed is selected - reset selection
if (mSelectedTab == view)
{
mSelectedTab = NULL;
}
}
void LLAccordionCtrl::initNoTabsWidget(const LLTextBox::Params& tb_params)

View File

@ -453,6 +453,12 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
{
// Remove accordion tab if category could not be added to observer.
mAccordion->removeCollapsibleCtrl(tab);
// kill removed tab
if (tab != NULL)
{
tab->die();
}
continue;
}
@ -523,6 +529,12 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
// 4. Remove outfit tab from accordion.
mAccordion->removeCollapsibleCtrl(tab);
// kill removed tab
if (tab != NULL)
{
tab->die();
}
}
}