sw/source/filter/html/htmlfldw.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 9c24c34fcd01d92140c0a36c5d9d139c5d7bee26 Author: Miklos Vajna <[email protected]> AuthorDate: Wed Apr 19 09:17:21 2023 +0200 Commit: Christian Lohmaier <[email protected]> CommitDate: Wed Apr 26 13:59:15 2023 +0200 sw: fix crash in OutHTML_SwFormatField() Crashreport signature: program/libswlo.so SwDocShell::GetView() sw/inc/docsh.hxx:222 program/libswlo.so OutHTML_SwFormatField(Writer&, SfxPoolItem const&) sw/source/filter/html/htmlfldw.cxx:549 ... program/libswlo.so SwTransferable::WriteObject(tools::SvRef<SotTempStream>&, void*, unsigned int, com::sun::star::datatransfer::DataFlavor const&) sw/source/uibase/dochdl/swdtflvr.cxx:? I.e. clipboard documents don't have a doc shell, handle that. Change-Id: I48b22087f759a11b4aa46b83b310f4a661e1fbc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150897 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 5951e37eb24e09d3c24cb4cab4b0f3da41e3dfff) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150913 Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit 1221b426877a8645561d574af814739be67096d5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150918 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Christian Lohmaier <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 1cf3f5b24fed..1058ee9aff26 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -540,7 +540,7 @@ Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt ) { const SwTextField *pTextField = rField.GetTextField(); OSL_ENSURE( pTextField, "Where is the txt fld?" ); - if( pTextField ) + if( pTextField && rWrt.m_pDoc->GetDocShell() ) { // ReqIF-XHTML doesn't allow specifying a background color. bool bFieldShadings = SwViewOption::IsFieldShadings() && !rHTMLWrt.mbReqIF;
