summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/access/accmap.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 60548581110d..13a2c8bb2019 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -144,7 +144,7 @@ SwDrawModellListener_Impl::SwDrawModellListener_Impl( SdrModel *pDrawModel ) :
SwDrawModellListener_Impl::~SwDrawModellListener_Impl()
{
- EndListening( *mpDrawModel );
+ Dispose();
}
void SAL_CALL SwDrawModellListener_Impl::addEventListener( const uno::Reference< document::XEventListener >& xListener ) throw (uno::RuntimeException, std::exception)
@@ -198,6 +198,9 @@ void SwDrawModellListener_Impl::Notify( SfxBroadcaster& /*rBC*/,
void SwDrawModellListener_Impl::Dispose()
{
+ if (mpDrawModel != nullptr) {
+ EndListening( *mpDrawModel );
+ }
mpDrawModel = nullptr;
}