summaryrefslogtreecommitdiff
path: root/dbaccess/source
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 /dbaccess/source
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 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index be857da0de9c..db5bec8c6428 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -248,6 +248,11 @@ void SAL_CALL SbaTableQueryBrowser::disposing()
// remove ourself as status listener
implRemoveStatusListeners();
+ // check out from all the objects we are listening
+ // the frame
+ if (m_xCurrentFrameParent.is())
+ m_xCurrentFrameParent->removeFrameActionListener(static_cast<css::frame::XFrameActionListener*>(this));
+
// remove the container listener from the database context
try
{
@@ -259,10 +264,6 @@ void SAL_CALL SbaTableQueryBrowser::disposing()
DBG_UNHANDLED_EXCEPTION("dbaccess");
}
- // check out from all the objects we are listening
- // the frame
- if (m_xCurrentFrameParent.is())
- m_xCurrentFrameParent->removeFrameActionListener(static_cast<css::frame::XFrameActionListener*>(this));
SbaXDataBrowserController::disposing();
}