summaryrefslogtreecommitdiff
path: root/vcl/source/window/menu.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/menu.cxx')
-rw-r--r--vcl/source/window/menu.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 8142bb649cc5..271ab84ac60a 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2764,7 +2764,10 @@ sal_uInt16 PopupMenu::ImplExecute( const VclPtr<vcl::Window>& pW, const tools::R
// set the flag to hide or show accelerators in the menu depending on whether the menu was launched by mouse or keyboard shortcut
if( pSFrom && pSFrom->IsMenuBar())
- ((static_cast<MenuBarWindow*>(pSFrom->pWindow.get())))->SetMBWHideAccel(!(static_cast<MenuBarWindow*>(pSFrom->pWindow.get())->GetMBWMenuKey()));
+ {
+ auto pMenuBarWindow = static_cast<MenuBarWindow*>(pSFrom->pWindow.get());
+ pMenuBarWindow->SetMBWHideAccel( !(pMenuBarWindow->GetMBWMenuKey()) );
+ }
delete mpLayoutData;
mpLayoutData = nullptr;