summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-06-19 09:24:35 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-06-19 09:24:35 +0200
commit80f8bf77e5420c550294048b31911fefffa12fc5 (patch)
tree177fb04f7bf4ec03918ebf7cf629cab9f578de8b /sfx2
parentd2c469cc16bf303d4f5065a438d5252a31b3a564 (diff)
Prevent null pointer dereference
Change-Id: Ia197152f6ece37dd2dd2ce1b41c1dfd1a985781c
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 35af9e255b2c..15a76db3d78d 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -778,7 +778,10 @@ void SAL_CALL SfxBaseModel::dispose() throw(RuntimeException, std::exception)
m_pData->m_xDocumentMetadata.clear();
- EndListening( *m_pData->m_pObjectShell );
+ if ( m_pData->m_pObjectShell.Is() )
+ {
+ EndListening( *m_pData->m_pObjectShell );
+ }
m_pData->m_xCurrent = Reference< frame::XController > ();
m_pData->m_seqControllers = Sequence< Reference< frame::XController > > () ;