diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-01-27 14:24:37 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-01-27 14:24:37 +0200 |
commit | b68ccadd46d2ff094147ffd72318fd3a728c28eb (patch) | |
tree | 28cb78afe1090eed5477476512c9035ee282cda5 /indra | |
parent | 684cfb722e433c7625c7c945aca05e0154915c8f (diff) |
Fixed critical bug EXT-4725 (Viewer crashes if try to call from 'Nearby voice' floater)
- reason: LLContextMenu was not not deleted when LLPanelPeopleMenus::ContextMenu was destroyed.
Associated callbacks were called by Menu Holder for last selected menu_item_call for destroyed LLParticipantList::LLParticipantListMenu
- fix: added destruction of LLContextMenu when LLPanelPeopleMenus::ContextMenu is destructed.
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelpeoplemenus.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llpanelpeoplemenus.h | 2 |
2 files changed, 10 insertions, 1 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) diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index 14ae2985f0..7251f6dbbd 100644 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -45,7 +45,7 @@ class ContextMenu : public LLAvatarListItem::ContextMenu { public: ContextMenu(); - virtual ~ContextMenu() {} + virtual ~ContextMenu(); /** * Show the menu at specified coordinates. |