diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 12:27:46 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 12:27:46 +0300 |
commit | e59216443619dd2280ce0fff316a2b9e2ee7cf5e (patch) | |
tree | 27d782916858596d67a60ecf56ca07b6a44a4601 /indra/newview/llpopupview.cpp | |
parent | dcb85f9f9d1019bb046a5719bc3645fa96a2d060 (diff) | |
parent | bb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff) |
Merge branch 'main' into release/maint-c
# Conflicts:
# indra/llui/lltexteditor.cpp
# indra/newview/llcontrolavatar.cpp
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(); + } } } |