diff options
-rw-r--r-- | comphelper/source/misc/SelectionMultiplex.cxx | 9 | ||||
-rw-r--r-- | include/comphelper/SelectionMultiplex.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/Navigator.cxx | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/comphelper/source/misc/SelectionMultiplex.cxx b/comphelper/source/misc/SelectionMultiplex.cxx index 267266388c71..e4fb824a0ba3 100644 --- a/comphelper/source/misc/SelectionMultiplex.cxx +++ b/comphelper/source/misc/SelectionMultiplex.cxx @@ -95,7 +95,16 @@ void SAL_CALL OSelectionChangeMultiplexer::selectionChanged( const EventObject& m_pListener->_selectionChanged(_rEvent); } +void OSelectionChangeMultiplexer::dispose() +{ + osl_atomic_increment(&m_refCount); + { + Reference< XSelectionChangeListener> xPreventDelete(this); + m_xSet->removeSelectionChangeListener(xPreventDelete); + } + osl_atomic_decrement(&m_refCount); } +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/comphelper/SelectionMultiplex.hxx b/include/comphelper/SelectionMultiplex.hxx index c1a1842f2ee0..ab980984aa16 100644 --- a/include/comphelper/SelectionMultiplex.hxx +++ b/include/comphelper/SelectionMultiplex.hxx @@ -80,6 +80,8 @@ namespace comphelper void unlock(); /// get the lock count sal_Int32 locked() const { return m_nLockCount; } + + void dispose(); }; diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index bdc2a646905b..586494bbe2b9 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -239,6 +239,7 @@ NavigatorTree::~NavigatorTree() delete pData; return false; }); + m_pSelectionListener->dispose(); m_pReportListener->dispose(); } |