summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-24 20:56:23 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-24 20:56:23 +0300
commit94ebf52edd6d1a610bf4cbfcc304dda21d544951 (patch)
tree79c40c639740f8e4da0c918e0612c987693798c3 /indra
parentbf8cc6b2f7d0563a61dcc45b7feaf4fffacbfbe1 (diff)
SL-12435 Crash on mRowPanels.back()
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lloutfitgallery.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 3d1428bb63..fd01be6531 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -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)