summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-04-01 17:07:04 -0400
committerHenry Castro <hcastro@collabora.com>2021-04-08 13:58:11 +0200
commitf153be729ed12ea301642e7d2551ec60b70a2a61 (patch)
treea4c2439d0870f0923c0beb333d53743a4ac9cbdb /sd
parentc0936ba2474f199b7242e2ca0a2d460647bc339e (diff)
lok: remove event listener when disposing
In order to prevent that the event listener holds the object reference count when removed, ensure they are removed when disposing the object. Change-Id: I7cb4cb7d87acfc9610c2498760ade531456fe22e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113493 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/framework/module/SlideSorterModule.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sd/source/ui/framework/module/SlideSorterModule.cxx b/sd/source/ui/framework/module/SlideSorterModule.cxx
index 1aa96bd0b2d4..b6e9e658b099 100644
--- a/sd/source/ui/framework/module/SlideSorterModule.cxx
+++ b/sd/source/ui/framework/module/SlideSorterModule.cxx
@@ -237,6 +237,10 @@ void SAL_CALL SlideSorterModule::disposing()
{
if (mxConfigurationController.is())
{
+ uno::Reference<lang::XComponent> const xComponent(mxConfigurationController, UNO_QUERY);
+ if (xComponent.is())
+ xComponent->removeEventListener(this);
+
mxConfigurationController->removeConfigurationChangeListener(this);
mxConfigurationController = nullptr;
}