diff options
author | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-04-02 00:43:32 +0300 |
---|---|---|
committer | Sergei Litovchuk <slitovchuk@productengine.com> | 2010-04-02 00:43:32 +0300 |
commit | 3962ca7a0b1469a40b5f7cb0587c65c4ebf33cb6 (patch) | |
tree | 37ca1c4d6e4a9437a35a8f00d7043a679a453b52 /indra/newview/llpaneloutfitedit.cpp | |
parent | 0d7d486f8f14f160de82170ea2f05f1c636b879d (diff) |
Low bug (EXT-6677) Crash when selecting empty outfit edit panel
- Added NULL check for selected item pointer.
Reviewed by Neal Orman https://codereview.productengine.com/secondlife/r/162/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpaneloutfitedit.cpp')
-rw-r--r-- | indra/newview/llpaneloutfitedit.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index ba22adc01c..2b25c544e3 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -413,7 +413,11 @@ void LLPanelOutfitEdit::onLookItemSelectionChange(void) { S32 left_offset = -4; S32 top_offset = -10; - LLRect rect = mLookContents->getLastSelectedItem()->getRect(); + LLScrollListItem* item = mLookContents->getLastSelectedItem(); + if (!item) + return; + + LLRect rect = item->getRect(); LLRect btn_rect( left_offset + rect.mRight - 50, top_offset + rect.mTop, |