vcl/unx/generic/gdi/gdiimpl.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 72a08a55791a1c17c0ec15b2ab5c7294c23e2831
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Jan 8 21:21:13 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Jan 9 08:55:22 2023 +0000

    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 <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

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()

Reply via email to