sw/source/filter/xml/xmlexp.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit ce019c56e902b5c5115b31c21163a4daa14dd006 Author: Xisco Fauli <[email protected]> AuthorDate: Fri Jan 23 11:28:06 2026 +0100 Commit: Adolfo Jayme Barrientos <[email protected]> CommitDate: Tue Jan 27 20:09:10 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/+/198009 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index 07d011f0e05a..a98a3848b45d 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()
