summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-07-03 21:24:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-07-03 22:39:00 +0200
commitf283fc0fd3fe3c7406a2946e5e4ea66dead1b6ef (patch)
tree843ebb9c700263c66398010e44e557683df6c737 /vcl
parenta780c820f5cf3bfbb5d88bd5c6ca670e0a0c730f (diff)
fix crashes in Bitmap::Invert
after commit 0bfe57f50b79362ab1167388ba95c8f0bf988c4f Author: Noel Grandin <noel.grandin@collabora.co.uk> 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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/bitmap/bitmappaint.cxx2
1 files changed, 2 insertions, 0 deletions
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())
{