summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-09-29 09:52:05 +0200
committerCaolán McNamara <caolanm@redhat.com>2020-09-29 13:40:24 +0200
commit0d673058ad88959622e2195975a6d5cf824c6fca (patch)
tree2bdd6b917045ba6e00a6c56cdff0c27dac62fef5 /vcl
parent45096d16b82678873964802fd21922368a25296d (diff)
avoid crash if DrawTransformedBitmap() would mean empty Skia bitmap
I can reproduce this sometimes with the document from tdf#136223. Change-Id: Ie6e57f18936a5de7f99ab01932be229625b737c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103596 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 1cd7e2a4042b92123d8c94ef10b2e8baf7cfaafa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103575 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/skia/gdiimpl.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index 5be32cdafb54..a4f0d5eb1a5d 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -1450,6 +1450,8 @@ sk_sp<SkImage> SkiaSalGraphicsImpl::mergeCacheBitmaps(const SkiaSalBitmap& bitma
// GPU-accelerated drawing with SkShader should be fast enough to not need caching.
if (isGPU())
return image;
+ if (targetSize.IsEmpty())
+ return image;
// Probably not much point in caching of just doing a copy.
if (alphaBitmap == nullptr && targetSize == bitmap.GetSize())
return image;