summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-21 15:22:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-21 15:52:22 +0000
commit813a1ea12da7f588c22cf40bd1d6b227bf01a539 (patch)
tree8dcc3dc20346af5a5221362bdb3508e08d911abc /sw
parente19de1925d41fb4af490df1c5b64ce737f5f9cf9 (diff)
coverity#705960 Dereference before null check
Change-Id: I39253ca1e50c57564b594401f69cef4b661dbd2a
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/uibase/uno/SwXDocumentSettings.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
index 877e80528cbf..c8f684935113 100644
--- a/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/core/uibase/uno/SwXDocumentSettings.cxx
@@ -822,8 +822,10 @@ void SwXDocumentSettings::_preGetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
+ if (NULL == mpDocSh)
+ throw UnknownPropertyException();
mpDoc = mpDocSh->GetDoc();
- if( NULL == mpDoc || NULL == mpDocSh )
+ if (NULL == mpDoc)
throw UnknownPropertyException();
}