SL-12435 Crash on mRowPanels.back()

meow-7.2.2
Andrey Kleshchev 2020-09-24 20:56:23 +03:00
parent bf8cc6b2f7
commit 94ebf52edd
1 changed files with 10 additions and 1 deletions

View File

@ -67,6 +67,7 @@ LLOutfitGallery::LLOutfitGallery(const LLOutfitGallery::Params& p)
mOutfitsObserver(NULL),
mScrollPanel(NULL),
mGalleryPanel(NULL),
mLastRowPanel(NULL),
mGalleryCreated(false),
mRowCount(0),
mItemsAddedCount(0),
@ -239,7 +240,15 @@ void LLOutfitGallery::removeLastRow()
mGalleryPanel->removeChild(mLastRowPanel);
mUnusedRowPanels.push_back(mLastRowPanel);
mRowPanels.pop_back();
mLastRowPanel = mRowPanels.back();
if (mRowPanels.size() > 0)
{
// Just removed last row
mLastRowPanel = mRowPanels.back();
}
else
{
mLastRowPanel = NULL;
}
}
LLPanel* LLOutfitGallery::addToRow(LLPanel* row_stack, LLOutfitGalleryItem* item, int pos, int hgap)