summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2016-02-01 16:06:33 +0100
committerMichael Stahl <mstahl@redhat.com>2016-02-12 20:39:52 +0000
commit8d3fe0bce57633c9540c58ee05314e15ff51e2b8 (patch)
treef488b4a206b9ca6eb90546aed1ff8ba9f36c6d41
parent8856f425216f581b098ba84c125443c0856b7122 (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> (cherry picked from commit 90dfa7cbcaf32aab6005b94b393c7c409ff1af8f) Reviewed-on: https://gerrit.libreoffice.org/22154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-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() );
}