[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/source
Caolán McNamara
caolanm at redhat.com
Wed Aug 20 06:06:20 PDT 2014
sw/source/core/crsr/annotationmark.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 087c897d3da7a81b63fc79442127eb880d5c3155
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
(cherry picked from commit 17ccc09ec27bde00e5ed7a9fe6055a991992b0ed)
Reviewed-on: https://gerrit.libreoffice.org/11038
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index 95faaa5..bee1ed9 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -49,9 +49,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