summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2021-03-30 15:00:49 -0400
committerAndras Timar <andras.timar@collabora.com>2021-04-19 20:06:21 +0200
commit697a112334f7bba510f4ca2fd3ac83670ecf06a0 (patch)
tree10be0d2659ffb163b11aea0806ea472eb4b34bc5 /sdext
parent499ccf5be8812b09665d5f29aabe706509c5bcbf (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113455 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/presenter/PresenterController.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
index b26dfc2fb3af..601bbe1f9628 100644
--- a/sdext/source/presenter/PresenterController.cxx
+++ b/sdext/source/presenter/PresenterController.cxx
@@ -204,12 +204,6 @@ void PresenterController::disposing()
if (mxConfigurationController.is())
mxConfigurationController->removeConfigurationChangeListener(this);
- Reference<XComponent> xWindowManagerComponent (
- static_cast<XWeak*>(mpWindowManager.get()), UNO_QUERY);
- mpWindowManager = nullptr;
- if (xWindowManagerComponent.is())
- xWindowManagerComponent->dispose();
-
if (mxController.is())
{
Reference<frame::XFrame> xFrame (mxController->getFrame());
@@ -218,6 +212,12 @@ void PresenterController::disposing()
mxController = nullptr;
}
+ Reference<XComponent> xWindowManagerComponent (
+ static_cast<XWeak*>(mpWindowManager.get()), UNO_QUERY);
+ mpWindowManager = nullptr;
+ if (xWindowManagerComponent.is())
+ xWindowManagerComponent->dispose();
+
mxComponentContext = nullptr;
mxConfigurationController = nullptr;
mxSlideShowController = nullptr;