sw/source/core/access/accmap.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit c5fefe46fc9dca3942b2fc33ffd1f7e041d450e6 Author: Stephan Bergmann <sberg...@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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits