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

New commits:
commit 981de2fd950af808e8f42a047aeca83687ed2f7b
Author:     Noel Grandin <n...@peralex.com>
AuthorDate: Mon Apr 13 19:40:14 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Apr 13 22:47:32 2020 +0200

    tdf#104878 related, fix abort()
    
    in SkiaCompatibleDC::getImageAsDiff
    when loading the larger example file.
    
    We hit the abort because we have a rectangle here
    with  width and height -2.
    
    Not sure where that is coming from, because the crash
    doesn't happen in debug build, only optimised.
    
    Change-Id: I448b418dee26536d361e82e4d649be447ba43725
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92127
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index fa5656b2f682..16a308064b12 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -830,7 +830,7 @@ bool SalGraphics::DrawNativeControl( ControlType nType, 
ControlPart nPart, const
 {
     bool bRet = false;
     tools::Rectangle aControlRegion(rControlRegion);
-    if (aControlRegion.IsEmpty())
+    if (aControlRegion.IsEmpty() || aControlRegion.GetWidth() <= 0 || 
aControlRegion.GetHeight() <= 0)
         return bRet;
 
     if( (m_nLayout & SalLayoutFlags::BiDiRtl) || (pOutDev && 
pOutDev->IsRTLEnabled()) )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to