summaryrefslogtreecommitdiff
path: root/indra/newview/llpopupview.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-05-15 12:24:16 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-05-15 12:24:16 -0400
commit9463f10b3332d34655006f4ba5127b114ca6e0c3 (patch)
tree2e5e3226fbae28cba66e473edc09ccc9f8bd50cf /indra/newview/llpopupview.cpp
parent7137647e90d8c11197513f542f04fb39b483d663 (diff)
parentb1098308428873e927cbf3c956ed0a7f17dc439b (diff)
Merge branch 'release/luau-scripting' into lua-timers after Maint X
Diffstat (limited to 'indra/newview/llpopupview.cpp')
-rw-r--r--indra/newview/llpopupview.cpp16
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();
+ }
}
}