sw/source/filter/xml/xmlexp.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit 897bfd9a560a3b30e9d5c250dfd155dc3f6dbfef Author: Xisco Fauli <[email protected]> AuthorDate: Fri Jan 23 11:28:06 2026 +0100 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Jan 27 20:16:40 2026 +0100 crashreporting: check xTextDoc in ExportContent_() Seen in https://crashreport.libreoffice.org/stats/crash_details/b4091e21-8d8c-48e8-818b-f05ac0aff040 Change-Id: If5aaf56724331ec92c85dac2f8b5ce4ba55e4143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197935 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins (cherry picked from commit 6920e84063ba52955d0edb2169aa4c728881397e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198011 Reviewed-by: Christian Lohmaier <[email protected]> Tested-by: Mike Kaganski <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index ca6996f9168d..a523c49a79d2 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -539,11 +539,14 @@ void SwXMLExport::ExportContent_() GetTextParagraphExport()->exportTrackedChanges( false ); GetTextParagraphExport()->exportTextDeclarations(); - Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY ); - Reference < XText > xText = xTextDoc->getText(); - GetTextParagraphExport()->exportFramesBoundToPage( m_bShowProgress ); - GetTextParagraphExport()->exportText( xText, m_bShowProgress ); + + Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY ); + if (xTextDoc.is()) + { + Reference < XText > xText = xTextDoc->getText(); + GetTextParagraphExport()->exportText( xText, m_bShowProgress ); + } } SwDoc* SwXMLExport::getDoc()
