summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
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();
}