sw/source/core/txtnode/fntcache.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 19c6fe6463e9c21be6ad876b26904ab9ec06f891 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Jul 25 15:51:35 2024 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Jul 25 17:35:03 2024 +0200 sw: C6011: Dereferencing NULL pointer 'pVSh' Change-Id: Ife344c9d88a68abb784b094152c4c3f9d8ce271d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171016 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index d52484432791..f31bbd4c672b 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2294,7 +2294,7 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont ) } // change painting color depending of dark/bright background - if (!pVSh->GetWin() || // ie. IsPrinting, see SwViewShell::GetWin() + if ((pVSh && !pVSh->GetWin()) || // ie. IsPrinting, see SwViewShell::GetWin() svtools::ColorConfig().GetColorValue(svtools::FONTCOLOR, false).nColor == COL_AUTO) // GetFontColor() uses the smart flag { if ( pCol->IsDark() )