diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2020-04-23 12:33:17 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2020-04-23 15:35:39 +0200 |
commit | b764e3d10d31d3d1f99ae6127cb607af69abcb2e (patch) | |
tree | 0e01b85035b2d4badcc4d2692c113f4845e755e6 | |
parent | 95747c630766c9e3287c2bfea7255ad23a24ce5d (diff) |
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@collabora.com>
-rw-r--r-- | vcl/skia/gdiimpl.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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; |