[Libreoffice-commits] core.git: vcl/skia

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 23 13:36:10 UTC 2020


 vcl/skia/gdiimpl.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b764e3d10d31d3d1f99ae6127cb607af69abcb2e
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Thu Apr 23 12:33:17 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Apr 23 15:35:39 2020 +0200

    avoid Skia xor crash with not-yet-drawn surface (tdf#132335)
    
    No content yet, nothing to xor with.
    
    Change-Id: I68b44d6051859a61d50c5fbf8e3c63e719a87ca3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92753
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 6926823a5db0..2ed26e7d348e 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -505,8 +505,9 @@ void SkiaSalGraphicsImpl::applyXor()
     // in each operation by extending mXorRegion with the area that should be
     // updated.
     assert(mXorMode);
-    if (!mXorRegion.op(SkIRect::MakeXYWH(0, 0, mSurface->width(), mSurface->height()),
-                       SkRegion::kIntersect_Op))
+    if (!mSurface
+        || !mXorRegion.op(SkIRect::MakeXYWH(0, 0, mSurface->width(), mSurface->height()),
+                          SkRegion::kIntersect_Op))
     {
         mXorRegion.setEmpty();
         return;


More information about the Libreoffice-commits mailing list