vcl/source/bitmap/BitmapEx.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 344fe3bc48bd84799791e4e321fa37b2150e6b6b
Author:     Noel Grandin <n...@peralex.com>
AuthorDate: Tue Mar 30 18:42:28 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Mar 30 21:14:19 2021 +0200

    short circuit image creation if dest size is zero
    
    Change-Id: Iace5c871c6a95da8828fa103474f77d5d0555484
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113385
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx
index ca80d6650380..0464cbd47f8a 100644
--- a/vcl/source/bitmap/BitmapEx.cxx
+++ b/vcl/source/bitmap/BitmapEx.cxx
@@ -59,7 +59,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, 
Size aSize )
     : meTransparent(TransparentType::NONE)
     , mbAlpha(false)
 {
-    if( rBitmapEx.IsEmpty() )
+    if( rBitmapEx.IsEmpty() || aSize.IsEmpty() )
         return;
 
     maBitmap = Bitmap(aSize, rBitmapEx.maBitmap.getPixelFormat());
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to