sw/source/filter/xml/xmlimp.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 440bbff7f8e6726412996c9a71de19aef41b1e25 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Jul 28 14:15:26 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sun Aug 4 15:39:06 2024 +0200 ofz: Null-dereference READ Change-Id: I872cd2b0c32f88a5ac09ea3082f05b7d3c41feb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171141 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins (cherry picked from commit b8fddfdde9291cdb7db9912e86b59dc11624dedb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171185 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit c93ca26f53871747cd28f5a700fd7eebd55629f3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171290 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 6b6831c8bc5a..86d902c84704 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -912,6 +912,11 @@ SwDoc* SwXMLImport::endDocAdjustNodes() return nullptr; } SwPaM *pPaM = pTextCursor->GetPaM(); + if (!pPaM) + { + SAL_WARN("sw", "SwXMLImport::endDocAdjustNodes: PaM missing"); + return nullptr; + } if( IsInsertMode() && m_oSttNdIdx->GetIndex() ) { // If we are in insert mode, join the split node that is in front