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-05-16 23:47:24 +0200
commit4e7e2aa66cac4ae3598e861d2ca2d13d5b749311 (patch)
tree2aac16236d5ddadf31eab4358ff068df7d49c3f4 /sdext
parentcbbbb70e9b9655afa8a66ab5c46ec493f1e06716 (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 '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 6d414d5f66ca..612b40ab9e08 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;