vcl/source/bitmap/bitmappaint.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit f283fc0fd3fe3c7406a2946e5e4ea66dead1b6ef
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jul 3 21:24:59 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jul 3 22:39:00 2023 +0200

    fix crashes in Bitmap::Invert
    
    after
        commit 0bfe57f50b79362ab1167388ba95c8f0bf988c4f
        Author: Noel Grandin <noel.gran...@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.gran...@collabora.co.uk>

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

Reply via email to