summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-03-30 15:00:49 -0400
committerHenry Castro <hcastro@collabora.com>2021-04-01 14:07:10 +0200
commita06f8147fe34c19da168de5d7b26615981cf055e (patch)
tree6c81be7aa69dd8d8ee1555986144d42f19a20833 /extensions
parent5f762b34bb1f93aeb409060d74b8e38ab75a8732 (diff)
lok: remove frame action listener when disposing
In order to prevent that the frame action listener holds the object reference count when removed, ensure they are removed when disposing the object. Change-Id: If83574e31230d9c683adaf36af36485650fd2c50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113389 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/framectr.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index 7b0a5dd9eaba..e83580689435 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -221,6 +221,11 @@ void BibFrameController_Impl::dispose()
{
m_bDisposing = true;
lang::EventObject aObject;
+ uno::Reference< XFrame > xFrame = getFrame();
+
+ if (xFrame.is())
+ xFrame->removeFrameActionListener( m_xImpl );
+
aObject.Source = static_cast<XController*>(this);
m_xImpl->aLC.disposeAndClear(aObject);
m_xDatMan.clear();