diff options
author | Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org> | 2023-07-14 01:03:56 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-07-14 11:11:04 +0200 |
commit | d86a6d2b47c6a22d185dc631388ca3f2c0386a35 (patch) | |
tree | 60eda05029ad455711831713dc8fc8baff5a679d | |
parent | 8bd30999098567b3bdb84a6ca65c071952192932 (diff) |
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.stahl@allotropia.de>
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index d5e430bb8711..3face1677c13 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -368,6 +368,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()); |