diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-15 16:17:09 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-15 16:17:09 -0400 |
| commit | 2e144ecbb2cc7676cfb9f5ab46a2f63c8af85d85 (patch) | |
| tree | 0296876c167d0bec11434394157b4a5b1c0b63a5 /indra/newview/llpopupview.cpp | |
| parent | 1b5f0590ce45ce6e540d266a8902af5839885cfb (diff) | |
| parent | 33ad8db77584c66496f261a1cfd9aa535462a003 (diff) | |
Merge branch 'main' into nat/releaseos following Maint X promotion
Diffstat (limited to 'indra/newview/llpopupview.cpp')
| -rw-r--r-- | indra/newview/llpopupview.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/llpopupview.cpp b/indra/newview/llpopupview.cpp index 353d261ad1..0b13fc37b9 100644 --- a/indra/newview/llpopupview.cpp +++ b/indra/newview/llpopupview.cpp @@ -256,16 +256,16 @@ void LLPopupView::removePopup(LLView* popup) void LLPopupView::clearPopups() { - for (popup_list_t::iterator popup_it = mPopups.begin(); - popup_it != mPopups.end();) + while (!mPopups.empty()) { + popup_list_t::iterator popup_it = mPopups.begin(); LLView* popup = popup_it->get(); - - popup_list_t::iterator cur_popup_it = popup_it; - ++popup_it; - - mPopups.erase(cur_popup_it); - popup->onTopLost(); + // Remove before notifying in case it will cause removePopup + mPopups.erase(popup_it); + if (popup) + { + popup->onTopLost(); + } } } |
