diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2016-03-02 22:40:14 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2016-03-02 22:56:10 +0200 |
commit | 9d6e1de029e992d189882ed7098acb6ac8cfe1fe (patch) | |
tree | b6aed96e4a1e68d1204989345ebf0680243949e8 | |
parent | b2f5336b08b5f638f890a626eb2aeefaf499a79b (diff) |
Context menus were never destructed
Change-Id: I34ae9dbb5b00fa2b6a1ef5c115a796d4e28eafa9
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 25ce3fe518c6..350277f69074 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1899,6 +1899,10 @@ void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window *pWin, c PopupMenu* pVCLMenu = static_cast< PopupMenu* >( pAwtMenu->GetMenu() ); if ( pVCLMenu && GetFrame()->GetViewShell()->TryContextMenuInterception( *pVCLMenu, rResName, aEvent ) ) pVCLMenu->Execute( pWindow, aPos ); + + css::uno::Reference< css::lang::XComponent > xComponent( xPopupController, css::uno::UNO_QUERY ); + if ( xComponent.is() ) + xComponent->dispose(); } /** With this method the SfxDispatcher can be locked and released. A locked |