sw/source/core/crsr/annotationmark.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 087c897d3da7a81b63fc79442127eb880d5c3155 Author: Caolán McNamara <caol...@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 <dtar...@redhat.com> Tested-by: David Tardon <dtar...@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 ) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits