summaryrefslogtreecommitdiff
path: root/framework/source/uielement/menubarwrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/uielement/menubarwrapper.cxx')
-rw-r--r--framework/source/uielement/menubarwrapper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx
index 1d202720884f..d420fa14d8b4 100644
--- a/framework/source/uielement/menubarwrapper.cxx
+++ b/framework/source/uielement/menubarwrapper.cxx
@@ -126,11 +126,11 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th
if ( xFrame.is() && m_xConfigSource.is() )
{
// Create VCL menubar which will be filled with settings data
- MenuBar* pVCLMenuBar = nullptr;
+ VclPtr<MenuBar> pVCLMenuBar;
VCLXMenuBar* pAwtMenuBar = nullptr;
{
SolarMutexGuard aSolarMutexGuard;
- pVCLMenuBar = new MenuBar();
+ pVCLMenuBar = VclPtr<MenuBar>::Create();
}
Reference< XModuleManager2 > xModuleManager = ModuleManager::create( m_xContext );