summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-21 13:26:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-21 14:29:09 +0200
commit634e98e767928806852aee6653a6fb6f35328eea (patch)
treeaa075df6233295e8e047bc009358d9c64fd00259 /vbahelper
parent0d0e6123db5f73aff1b203224609148b37194b71 (diff)
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@collabora.co.uk>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbaglobalbase.cxx4
1 files changed, 4 insertions, 0 deletions
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& )
{