summaryrefslogtreecommitdiff
path: root/dbaccess
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 /dbaccess
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 'dbaccess')
-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 2496ec8bc2b6..2d7d29f7797b 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();
}