diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index e495407495b1..9566a414fd62 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -744,9 +744,9 @@ bool ToolbarLayoutManager::dockToolbar( const OUString& rResourceURL, ui::Dockin SolarMutexGuard aGuard; { - if ( pToolBox ) + if (pToolBox) aSize = pToolBox->CalcWindowSizePixel( 1, ImplConvertAlignment( aUIElement.m_aDockedData.m_nDockedArea ) ); - else + else if (pWindow) aSize = pWindow->GetSizePixel(); }