summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
1 files changed, 1 insertions, 1 deletions
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() )