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

Caolán McNamara caolanm at redhat.com
Wed Aug 20 02:06:07 PDT 2014


 sw/source/core/crsr/annotationmark.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 17ccc09ec27bde00e5ed7a9fe6055a991992b0ed
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 20 10:04:32 2014 +0100

    fix crash on loading ooo83574-1.doc
    
    Change-Id: Ia959dde8bac2d663cf1a5bec0358ee89dcaf42ed

diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index 4e2e958..b4e3c1f 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -51,9 +51,11 @@ namespace sw { namespace mark
 
     void AnnotationMark::InitDoc(SwDoc* const io_pDoc)
     {
-        SwTxtFld* pTxtFld =
-            GetMarkEnd().nNode.GetNode().GetTxtNode()->GetFldTxtAttrAt(
-            GetMarkEnd().nContent.GetIndex()-1, true );
+        SwTxtNode *pTxtNode = GetMarkEnd().nNode.GetNode().GetTxtNode();
+
+        SwTxtFld* pTxtFld = pTxtNode ?
+            pTxtNode->GetFldTxtAttrAt(
+            GetMarkEnd().nContent.GetIndex()-1, true ) : NULL;
         OSL_ENSURE( pTxtFld != NULL, "<AnnotationMark::InitDoc(..)> - missing text attribute for annotation field!" );
         if ( pTxtFld != NULL )
         {


More information about the Libreoffice-commits mailing list