diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-10-19 23:53:53 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-10-19 23:53:53 +0300 |
| commit | f0cd5407c429f1033ede01e96a107daef70814fd (patch) | |
| tree | 3d10de84512f0e6a4ad663c7fbee5dc23317130c /indra/newview/lllistcontextmenu.cpp | |
| parent | 46427eefd4d27704397f4fe3cf3bc9d29946c1b2 (diff) | |
| parent | 5456af4c8ce8c2bef7d544cd8a928ea399832756 (diff) | |
SL-18412 Merge remote-tracking branch 'RyeMutt/viewer/menu-leaks' into DRTVWR-570-maint-Q
Diffstat (limited to 'indra/newview/lllistcontextmenu.cpp')
| -rw-r--r-- | indra/newview/lllistcontextmenu.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/indra/newview/lllistcontextmenu.cpp b/indra/newview/lllistcontextmenu.cpp index 6bda8b1d0d..77185411c5 100644 --- a/indra/newview/lllistcontextmenu.cpp +++ b/indra/newview/lllistcontextmenu.cpp @@ -51,6 +51,7 @@ LLListContextMenu::~LLListContextMenu() if (!mMenuHandle.isDead()) { mMenuHandle.get()->die(); + mMenuHandle.markDead(); } } @@ -59,13 +60,8 @@ void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 LLContextMenu* menup = mMenuHandle.get(); if (menup) { - //preventing parent (menu holder) from deleting already "dead" context menus on exit - LLView* parent = menup->getParent(); - if (parent) - { - parent->removeChild(menup); - } - delete menup; + menup->die(); + mMenuHandle.markDead(); mUUIDs.clear(); } |
