summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpeoplemenus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelpeoplemenus.cpp')
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index d9651a6045..501dac5dff 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -55,6 +55,15 @@ ContextMenu::ContextMenu()
{
}
+ContextMenu::~ContextMenu()
+{
+ // do not forget delete LLContextMenu* mMenu.
+ // It can have registered Enable callbacks which are called from the LLMenuHolderGL::draw()
+ // via selected item (menu_item_call) by calling LLMenuItemCallGL::buildDrawLabel.
+ // we can have a crash via using callbacks of deleted instance of ContextMenu. EXT-4725
+ if (mMenu) mMenu->die();
+}
+
void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y)
{
if (mMenu)