ofz: Null-dereference READ

Change-Id: I872cd2b0c32f88a5ac09ea3082f05b7d3c41feb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171141
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Caolán McNamara 2024-07-28 14:15:26 +01:00
parent 221e3fb4af
commit b8fddfdde9

View file

@ -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