From f283fc0fd3fe3c7406a2946e5e4ea66dead1b6ef Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 3 Jul 2023 21:24:59 +0200 Subject: fix crashes in Bitmap::Invert after commit 0bfe57f50b79362ab1167388ba95c8f0bf988c4f Author: Noel Grandin Date: Mon Jul 3 11:25:02 2023 +0200 fix assert when using skia and DBG_UTIL Change-Id: I95a77e13f93229696b3a1e4ba5a234afb3b3e957 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153931 Tested-by: Jenkins Reviewed-by: Noel Grandin --- vcl/source/bitmap/bitmappaint.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vcl') diff --git a/vcl/source/bitmap/bitmappaint.cxx b/vcl/source/bitmap/bitmappaint.cxx index 55ad22bea1b8..b8c415a4e340 100644 --- a/vcl/source/bitmap/bitmappaint.cxx +++ b/vcl/source/bitmap/bitmappaint.cxx @@ -61,6 +61,8 @@ bool Bitmap::Erase(const Color& rFillColor) bool Bitmap::Invert() { ScopedReadAccess pReadAcc(*this); + if (!pReadAcc) + return false; if (pReadAcc->HasPalette()) { -- cgit