diff options
| author | Rider Linden <rider@lindenlab.com> | 2017-01-25 11:13:59 -0800 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2017-01-25 11:13:59 -0800 |
| commit | 25cd2ed2052b0d30d61e8b81df151993983f561b (patch) | |
| tree | 7f9b29356b658303bdf7608a25ccb23c8e6130da /indra/llui/lllineeditor.cpp | |
| parent | 8d86f5a0c457fceff5923fb7ca32259b2718addc (diff) | |
| parent | 68413474c4479eee9bdbeb34ea131475ba1d646e (diff) | |
Merge
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
| -rw-r--r-- | indra/llui/lllineeditor.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 492c9315d1..c89e1dac1d 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -2636,10 +2636,17 @@ void LLLineEditor::showContextMenu(S32 x, S32 y) void LLLineEditor::setContextMenu(LLContextMenu* new_context_menu) { - if (new_context_menu) - mContextMenuHandle = new_context_menu->getHandle(); - else - mContextMenuHandle.markDead(); + LLContextMenu* menu = static_cast<LLContextMenu*>(mContextMenuHandle.get()); + if (menu) + { + menu->die(); + mContextMenuHandle.markDead(); + } + + if (new_context_menu) + { + mContextMenuHandle = new_context_menu->getHandle(); + } } void LLLineEditor::setFont(const LLFontGL* font) |
