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

New commits:
commit 0d673058ad88959622e2195975a6d5cf824c6fca
Author:     Luboš Luňák <[email protected]>
AuthorDate: Tue Sep 29 09:52:05 2020 +0200
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Sep 29 13:40:24 2020 +0200

    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 <[email protected]>
    (cherry picked from commit 1cd7e2a4042b92123d8c94ef10b2e8baf7cfaafa)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103575
    Reviewed-by: Caolán McNamara <[email protected]>

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;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to