sw/source/ui/chrdlg/drpcps.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
New commits: commit 3e6c7ac667511aaafd210b8e93cd54798c387acd Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Mar 18 00:00:11 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Mar 18 20:16:58 2023 +0000 cid#1523394 Dereference after null check Change-Id: I1feeace608c11b653fce17020afe592de4317de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149074 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index e7ff4a634b3c..b3778c861479 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -231,6 +231,11 @@ void SwDropCapsPict::UpdatePaintSettings() aFont.SetPitch(rFormatFont.GetPitch()); aFont.SetCharSet(rFormatFont.GetCharSet()); } + + const Color& rFontColor = mpPage->m_rSh.GetViewOptions()->GetFontColor(); + aFont.SetColor( rFontColor ); + maCJKFont.SetColor( rFontColor ); + maCTLFont.SetColor( rFontColor ); } mnTextH = mnLines * mnTotLineH; @@ -242,12 +247,6 @@ void SwDropCapsPict::UpdatePaintSettings() maCJKFont.SetTransparent(true); maCTLFont.SetTransparent(true); - const Color& rFontColor = mpPage->m_rSh.GetViewOptions()->GetFontColor(); - - aFont.SetColor( rFontColor ); - maCJKFont.SetColor( rFontColor ); - maCTLFont.SetColor( rFontColor ); - aFont.SetFillColor(Application::GetSettings().GetStyleSettings().GetWindowColor()); maCJKFont.SetFillColor(Application::GetSettings().GetStyleSettings().GetWindowColor()); maCTLFont.SetFillColor(Application::GetSettings().GetStyleSettings().GetWindowColor());