sw/source/filter/html/htmlfldw.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 20bf9f2b31343e17c14a3091d59b40a71eeb3e26 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Tue May 2 11:05:47 2023 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Mon May 8 16:43:30 2023 +0200 tdf#154551 check pointer before use Change-Id: Ied215ea393760f246128610c5b7b4d50ab211f97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151300 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisop...@gmail.com> Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 4ae52638e79a..6ea4aba211ab 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -541,7 +541,7 @@ SwHTMLWriter& OutHTML_SwFormatField( SwHTMLWriter& rWrt, const SfxPoolItem& rHt { const SwTextField *pTextField = rField.GetTextField(); OSL_ENSURE( pTextField, "Where is the txt fld?" ); - if( pTextField && rWrt.m_pDoc->GetDocShell() ) + if (pTextField && rWrt.m_pDoc->GetDocShell() && rWrt.m_pDoc->GetDocShell()->GetView()) { // ReqIF-XHTML doesn't allow specifying a background color. const SwViewOption* pViewOptions = rWrt.m_pDoc->GetDocShell()->GetView()->GetWrtShell().GetViewOptions();