svx/source/svdraw/svdetc.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 47993653622f8752529e55b9271585d0525e8efd
Author: Caolán McNamara <caol...@redhat.com>
Date:   Tue Jun 12 13:35:36 2018 +0100

    crashtesting: asserts on empty fill patterns
    
    since...
    
    commit d46c32140fdb05758c039dd27552b1788faac104
    Date:   Thu Jun 7 12:37:33 2018 +0200
    
        assert in BitmapInfoAccess if bitmap is empty or we can't read from it
    
    Change-Id: Ic54e1d2511f2089eda9e0941f45135ae5e6f084d
    Reviewed-on: https://gerrit.libreoffice.org/55686
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 526b3ca82cde..7d182d216fc0 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -290,9 +290,12 @@ bool GetDraftFillColor(const SfxItemSet& rSet, Color& rCol)
             const Size aSize(aBitmap.GetSizePixel());
             const sal_uInt32 nWidth = aSize.Width();
             const sal_uInt32 nHeight = aSize.Height();
+            if (nWidth <= 0 || nHeight <= 0)
+                return bRetval;
+
             Bitmap::ScopedReadAccess pAccess(aBitmap);
 
-            if(pAccess && nWidth > 0 && nHeight > 0)
+            if (pAccess)
             {
                 sal_uInt32 nRt(0);
                 sal_uInt32 nGn(0);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to