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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 30 19:15:06 UTC 2021


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

New commits:
commit 344fe3bc48bd84799791e4e321fa37b2150e6b6b
Author:     Noel Grandin <noel at peralex.com>
AuthorDate: Tue Mar 30 18:42:28 2021 +0200
Commit:     Noel Grandin <noel.grandin at 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.grandin at collabora.co.uk>
    Reviewed-by: Noel Grandin <noel.grandin at 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());


More information about the Libreoffice-commits mailing list