[Libreoffice-commits] core.git: sfx2/source

Maxim Monastirsky momonasmon at gmail.com
Wed Mar 2 20:57:50 UTC 2016


 sfx2/source/control/dispatch.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 9d6e1de029e992d189882ed7098acb6ac8cfe1fe
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Wed Mar 2 22:40:14 2016 +0200

    Context menus were never destructed
    
    Change-Id: I34ae9dbb5b00fa2b6a1ef5c115a796d4e28eafa9

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 25ce3fe..350277f 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


More information about the Libreoffice-commits mailing list