From 981de2fd950af808e8f42a047aeca83687ed2f7b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 13 Apr 2020 19:40:14 +0200 Subject: [PATCH] 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 --- vcl/source/gdi/salgdilayout.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) )