diff options
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r-- | indra/llui/llmenugl.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 79c38a87c0..f5dcae5787 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -709,14 +709,18 @@ void LLMenuItemTearOffGL::doIt() LLFloater* parent_floater = LLFloater::getFloaterByHandle(mParentHandle); LLFloater* tear_off_menu = LLTearOffMenu::create(getMenu()); - if (parent_floater && tear_off_menu) + + if (tear_off_menu) { - parent_floater->addDependentFloater(tear_off_menu, FALSE); - } + if (parent_floater) + { + parent_floater->addDependentFloater(tear_off_menu, FALSE); + } - // give focus to torn off menu because it will have been taken away - // when parent menu closes - tear_off_menu->setFocus(TRUE); + // give focus to torn off menu because it will have + // been taken away when parent menu closes + tear_off_menu->setFocus(TRUE); + } } LLMenuItemGL::doIt(); } |