summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-03-30 16:26:41 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2020-06-04 18:38:13 +0200
commit903c3b365ec8d6db5efdcff90b59204f465a8e56 (patch)
treef57416f3927dfa7d364161846a44c6b8bf7943db /sw
parent13192264e78ba1c810b3c061893e2ad1f6b3574a (diff)
crashtesting: null dereference of reexporting abi12570.odt to odt
FLY_AT_FLY shape is anchored on SwStartNode of fly section. (regression from ef8427d12a63127a2eb867637699343d630545dd) Change-Id: I4fe70237c060cc810af82657bc5791e7024db8f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91336 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 71ed878556422068041025668876fb3300c128df)
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docbm.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 0998c1c83644..d65f6f0a783b 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -397,10 +397,12 @@ namespace sw { namespace mark
" - more than USHRT_MAX marks are not supported correctly");
if ( (!rPaM.GetPoint()->nNode.GetNode().IsTextNode()
- // huh, SwXTextRange puts one on table node?
- && !rPaM.GetPoint()->nNode.GetNode().IsTableNode())
+ && (eType != MarkType::UNO_BOOKMARK
+ // SwXTextRange can be on table node or plain start node (FLY_AT_FLY)
+ || !rPaM.GetPoint()->nNode.GetNode().IsStartNode()))
|| (!rPaM.GetMark()->nNode.GetNode().IsTextNode()
- && !rPaM.GetMark()->nNode.GetNode().IsTableNode()))
+ && (eType != MarkType::UNO_BOOKMARK
+ || !rPaM.GetMark()->nNode.GetNode().IsStartNode())))
{
SAL_WARN("sw.core", "MarkManager::makeMark(..)"
" - refusing to create mark on non-textnode");