diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2010-01-29 15:59:09 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2010-01-29 15:59:09 +0200 |
commit | 011d659dd94b9def6feb87a5b8eccc2230aec643 (patch) | |
tree | 08e0d41813e6425f21cda93efb3b6b6512b162fd /indra | |
parent | bed3948c4fbeea6d912eb60ab93a24fb7cd7b7b4 (diff) | |
parent | efeaba0acd9b40d50a32e4c728489231fbaac7e8 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpanelpeoplemenus.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llpanelpeoplemenus.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 501dac5dff..470cfca8fe 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -61,7 +61,14 @@ ContextMenu::~ContextMenu() // 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(); + + // menu holder deletes its menus on viewer exit, so we have no way to determine if instance + // of mMenu has already been deleted except of using LLHandle. EXT-4762. + if (!mMenuHandle.isDead()) + { + mMenu->die(); + mMenu = NULL; + } } void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y) @@ -86,6 +93,7 @@ void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, std::copy(uuids.begin(), uuids.end(), mUUIDs.begin()); mMenu = createMenu(); + mMenuHandle = mMenu->getHandle(); mMenu->show(x, y); LLMenuGL::showPopup(spawning_view, mMenu, x, y); } diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index 7251f6dbbd..913638d8c8 100644 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -62,6 +62,7 @@ protected: std::vector<LLUUID> mUUIDs; LLContextMenu* mMenu; + LLHandle<LLView> mMenuHandle; }; /** |