summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/core/data/ww6/pass/crash-6.docbin0 -> 6672 bytes
-rw-r--r--sw/source/filter/basflt/fltshell.cxx7
2 files changed, 5 insertions, 2 deletions
diff --git a/sw/qa/core/data/ww6/pass/crash-6.doc b/sw/qa/core/data/ww6/pass/crash-6.doc
new file mode 100644
index 000000000000..08c879176a47
--- /dev/null
+++ b/sw/qa/core/data/ww6/pass/crash-6.doc
Binary files differ
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 2dae68cd4be8..6c722d3fc85c 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -120,8 +120,11 @@ bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, bool bCheck,
// The only position of 0x0D will not be able to make region in the old logic
// because it is beyond the length of para...need special consideration here.
- SwContentNode *const pContentNode(
- SwNodeIndex(rMkPos.m_nNode, +1).GetNode().GetContentNode());
+ sal_uLong nMk = rMkPos.m_nNode.GetIndex() + 1;
+ const SwNodes& rMkNodes = rMkPos.m_nNode.GetNodes();
+ if (nMk >= rMkNodes.Count())
+ return false;
+ SwContentNode *const pContentNode(rMkNodes[nMk]->GetContentNode());
if (rMkPos == rPtPos &&
((0 != rPtPos.m_nContent) || (pContentNode && (0 != pContentNode->Len())))
&& ( RES_TXTATR_FIELD != nWhich