diff options
Diffstat (limited to 'svx/source/fmcomp/gridctrl.cxx')
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index a54b3035a965..20830d55b552 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -197,7 +197,7 @@ class DisposeListenerGridBridge : public FmXDisposeListener { osl::Mutex m_aMutex; DbGridControl& m_rParent; - css::uno::Reference<FmXDisposeMultiplexer> m_xRealListener; + FmXDisposeMultiplexer* m_pRealListener; public: DisposeListenerGridBridge( DbGridControl& _rParent, const Reference< XComponent >& _rxObject); @@ -209,20 +209,25 @@ public: DisposeListenerGridBridge::DisposeListenerGridBridge(DbGridControl& _rParent, const Reference< XComponent >& _rxObject) :FmXDisposeListener(m_aMutex) ,m_rParent(_rParent) + ,m_pRealListener(nullptr) { if (_rxObject.is()) { - m_xRealListener = new FmXDisposeMultiplexer(this, _rxObject); + m_pRealListener = new FmXDisposeMultiplexer(this, _rxObject); + m_pRealListener->acquire(); } } DisposeListenerGridBridge::~DisposeListenerGridBridge() { - if (m_xRealListener.is()) + if (m_pRealListener) { - m_xRealListener->dispose(); + m_pRealListener->dispose(); + m_pRealListener->release(); + m_pRealListener = nullptr; } + } static const sal_uInt16 ControlMap[] = |