[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Tue Nov 3 23:03:47 PST 2015
sw/source/core/access/accmap.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit c5fefe46fc9dca3942b2fc33ffd1f7e041d450e6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Nov 4 08:02:59 2015 +0100
Don't dereference null pointer
Change-Id: If35672fae14541d5aa5f28e117bd63b69013d418
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 6054858..13a2c8b 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;
}
More information about the Libreoffice-commits
mailing list