diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-04 20:11:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-04 20:13:07 +0200 |
commit | ad5e8b30ac66a00d0110fcdaf4d064181247585b (patch) | |
tree | 98d389f23284d12d8a0489ed66a7f217b610ff9a /toolkit | |
parent | 552adfbbc6b3508eaed284675d1d76480598142c (diff) |
fix for invalid dynamic_cast
after my loplugin-cstylecast commits.
this is a follow on to the bug reported in fdo#84608
Change-Id: Icc4f4baf3690e939c07a71a949200270bf1f4614
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxtopwindow.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx index 21386aedb3ec..48b593eb37fb 100644 --- a/toolkit/source/awt/vclxtopwindow.cxx +++ b/toolkit/source/awt/vclxtopwindow.cxx @@ -147,15 +147,16 @@ void VCLXTopWindow_Base::setMenuBar( const ::com::sun::star::uno::Reference< ::c { SolarMutexGuard aGuard; - SystemWindow* pWindow = dynamic_cast<SystemWindow*>( GetWindowImpl() ); + vcl::Window* pWindow = GetWindowImpl(); if ( pWindow ) { - pWindow->SetMenuBar( NULL ); + SystemWindow* pSystemWindow = static_cast<SystemWindow*>( pWindow ); + pSystemWindow->SetMenuBar( NULL ); if ( rxMenu.is() ) { VCLXMenu* pMenu = VCLXMenu::GetImplementation( rxMenu ); if ( pMenu && !pMenu->IsPopupMenu() ) - pWindow->SetMenuBar( static_cast<MenuBar*>( pMenu->GetMenu() )); + pSystemWindow->SetMenuBar( static_cast<MenuBar*>( pMenu->GetMenu() )); } } mxMenuBar = rxMenu; |