sw/source/core/crsr/crstrvl.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 30933ad497fe0e8dd6af36721561706886ed0281 Author: Bjoern Michaelsen <bjoern.michael...@libreoffice.org> AuthorDate: Fri Jul 14 01:03:56 2023 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Jul 14 15:09:58 2023 +0200 tdf#153866: Fix TOX crash Im not sure why it should be valid that the ContentFrame should ever be nullptr here, but a simple check prevents the immediate crash. Change-Id: I19a2d04e41271ae6a5b6a3a79c31c3efd5db7875 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154404 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit d86a6d2b47c6a22d185dc631388ca3f2c0386a35) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154417 diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 0cf968a3d7e9..a1916c6cf691 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -365,6 +365,8 @@ void SwCursorShell::GotoTOXMarkBase() // Take the 1. and get the index type. Ask it for the actual index. const SwTOXType* pType = aMarks[0]->GetTOXType(); auto pContentFrame = pType->FindContentFrame(*GetDoc(), *GetLayout()); + if(!pContentFrame) + return; SwCallLink aLk(*this); // watch Cursor-Moves SwCursorSaveState aSaveState(*m_pCurrentCursor); assert(pContentFrame->IsTextFrame());