summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-07 09:34:18 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-07 10:14:49 +0100
commit89fe93e4597ff117361df889e0a347ff009abc42 (patch)
tree5b266483a1a634142c830b6906a53f22d02e283b /svx
parent98d8e26fb6597b4c29fd7baa0941b547dd10f055 (diff)
coverity#704824 Explicit null dereferenced
Change-Id: Ia05933f296c5e72982ef394e948bf90ebde583f4
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmvwimp.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 6459475f983a..bab4d973fb5b 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1717,10 +1717,13 @@ void FmXFormView::startMarkListWatching()
{
if ( !m_pWatchStoredList )
{
- m_pWatchStoredList = new ObjectRemoveListener( this );
FmFormModel* pModel = GetFormShell() ? GetFormShell()->GetFormModel() : NULL;
DBG_ASSERT( pModel != NULL, "FmXFormView::startMarkListWatching: shell has no model!" );
- m_pWatchStoredList->StartListening( *static_cast< SfxBroadcaster* >( pModel ) );
+ if (pModel)
+ {
+ m_pWatchStoredList = new ObjectRemoveListener( this );
+ m_pWatchStoredList->StartListening( *static_cast< SfxBroadcaster* >( pModel ) );
+ }
}
else
{