summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/awt/vclxtopwindow.cxx7
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;