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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri May 21 12:29:50 UTC 2021


 vbahelper/source/vbahelper/vbaglobalbase.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 634e98e767928806852aee6653a6fb6f35328eea
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri May 21 13:26:25 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri May 21 14:29:09 2021 +0200

    fix shutdown leak VbaGlobalsBase
    
    Change-Id: I12e81cd8374eaf15b4891d90a787e4184575486c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115912
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx
index 82808161e154..0e1dcf2b178a 100644
--- a/vbahelper/source/vbahelper/vbaglobalbase.cxx
+++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx
@@ -25,6 +25,7 @@
 #include <com/sun/star/beans/PropertyValue.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 
@@ -95,6 +96,9 @@ VbaGlobalsBase::~VbaGlobalsBase()
             // release application reference, as it is holding onto the context
             xNameContainer->removeByName( gsApplication );
         }
+        uno::Reference< lang::XComponent > xComponent( mxContext, uno::UNO_QUERY );
+        if (xComponent)
+            xComponent->dispose();
     }
     catch ( const uno::Exception& )
     {


More information about the Libreoffice-commits mailing list