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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 13 20:48:07 UTC 2020


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

New commits:
commit 981de2fd950af808e8f42a047aeca83687ed2f7b
Author:     Noel Grandin <noel at peralex.com>
AuthorDate: Mon Apr 13 19:40:14 2020 +0200
Commit:     Noel Grandin <noel.grandin at 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.grandin at 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()) )


More information about the Libreoffice-commits mailing list