summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2024-03-08 17:35:00 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2024-03-11 10:01:00 +0100
commit1ecbee191411bf340173fd64d56888e245a54e08 (patch)
tree581e8700d61020e6e7314618f4a03be734c1b7d4
parent059d3c514d28b075793be75fd9c1739ec1aeea99 (diff)
tdf#160095: fix crash when using ALT+RETURN twice
Change-Id: Idc4c84039115c8d88418246a17e281c26fb49b70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164592 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 82e6236cd6ba6f45aa913a3be606e6b00f81fe07) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164614 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/core/edit/edsect.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx
index daaa7296e81e..070a37a90d2f 100644
--- a/sw/source/core/edit/edsect.cxx
+++ b/sw/source/core/edit/edsect.cxx
@@ -316,6 +316,9 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos)
// find the table/section which is close
if( pTableNode == nullptr )
{
+ if( pSectionNode == nullptr )
+ return nullptr;
+
pInnermostNode = pSectionNode;
pSection = &static_cast<const SwSectionNode*>(pSectionNode)->GetSection();
}