diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpopupview.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 590a45c96c..1668a91eed 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -207,7 +207,11 @@ void LLPopupView::addPopup(LLView* popup) { if (popup) { - mPopups.erase(std::find(mPopups.begin(), mPopups.end(), popup->getHandle())); + popup_list_t::iterator iter = std::find(mPopups.begin(), mPopups.end(), popup->getHandle()); + if(iter != mPopups.end()) + { + mPopups.erase(iter); + } mPopups.push_front(popup->getHandle()); } } @@ -220,7 +224,11 @@ void LLPopupView::removePopup(LLView* popup) { gFocusMgr.setKeyboardFocus(NULL); } - mPopups.erase(std::find(mPopups.begin(), mPopups.end(), popup->getHandle())); + popup_list_t::iterator iter = std::find(mPopups.begin(), mPopups.end(), popup->getHandle()); + if(iter != mPopups.end()) + { + mPopups.erase(iter); + } popup->onTopLost(); } } |