diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-06-12 13:35:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-06-12 16:14:59 +0200 |
commit | 47993653622f8752529e55b9271585d0525e8efd (patch) | |
tree | 70d4ea3fb22bfe5e36a6b99b9663334afd7a89e1 /svx/source | |
parent | f24f7b83986da4934473cd8e51a8695e009f77d3 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdetc.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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); |