[Libreoffice-commits] core.git: sd/source

Oliver Specht oliver.specht at cib.de
Tue Feb 2 08:43:38 UTC 2016


 sd/source/ui/app/sdmod2.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 90dfa7cbcaf32aab6005b94b393c7c409ff1af8f
Author: Oliver Specht <oliver.specht at cib.de>
Date:   Mon Feb 1 16:06:33 2016 +0100

    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 at cib.de>
    Tested-by: Oliver Specht <oliver.specht at cib.de>

diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index f8f2d57..1f51811 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() );
         }


More information about the Libreoffice-commits mailing list