diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-01-08 21:21:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-01-09 08:55:22 +0000 |
commit | 72a08a55791a1c17c0ec15b2ab5c7294c23e2831 (patch) | |
tree | 7f309c1a30ee954ce83dfec2637c0b1102880b27 /vcl/unx | |
parent | 555f4333182abd0ca4aa06b354763f6dfbc3eb20 (diff) |
tdf#152931 deref of moPenColor std::optional on launching writer
Change-Id: I13cb7aade5b4a0142e23bd62e62d2160c73d8740
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145180
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/gdi/gdiimpl.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 4b3b128b7442..7f8672f07735 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -152,8 +152,8 @@ X11SalGraphicsImpl::~X11SalGraphicsImpl() void X11SalGraphicsImpl::Init() { - mnPenPixel = mrParent.GetPixel( *moPenColor ); - mnBrushPixel = mrParent.GetPixel( *moBrushColor ); + mnPenPixel = moPenColor ? mrParent.GetPixel(*moPenColor) : 0; + mnBrushPixel = moBrushColor ? mrParent.GetPixel(*moBrushColor) : 0; } XID X11SalGraphicsImpl::GetXRenderPicture() |