summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2016-02-01 16:06:33 +0100
committerOliver Specht <oliver.specht@cib.de>2016-02-02 08:42:55 +0000
commit90dfa7cbcaf32aab6005b94b393c7c409ff1af8f (patch)
tree02a0d5ad22bbe3dbc54170211e3fc3e445235ac0
parentef59f096a5c2c835cdfef380943d29943ed1bd2d (diff)
tdf#97374: prevent crash while updating SvxPageTitleField
with commit 2970ec843820a72d73a91cc11fc353e5b9fde5fd the check for a valid pDoc had been removed Change-Id: I644ee82a46ec4f047f1a1b6bff68c4b67e96c3d8 Reviewed-on: https://gerrit.libreoffice.org/22006 Reviewed-by: Oliver Specht <oliver.specht@cib.de> Tested-by: Oliver Specht <oliver.specht@cib.de>
-rw-r--r--sd/source/ui/app/sdmod2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index f8f2d57440f3..1f51811a4405 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -271,7 +271,8 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
}
else
{
- aRepresentation = ( ( pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS )
+ DocumentType eDocType = pDoc ? pDoc->GetDocumentType() : DOCUMENT_TYPE_IMPRESS;
+ aRepresentation = ( ( eDocType == DOCUMENT_TYPE_IMPRESS )
? SdResId(STR_FIELD_PLACEHOLDER_SLIDENAME).toString()
: SdResId(STR_FIELD_PLACEHOLDER_PAGENAME).toString() );
}