From c10733bd9897aef1e775399a70ae5e2684754ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Wed, 13 Sep 2023 08:06:51 +1000 Subject: Fix assertion failure on some systems when an INDIC_SQUIGGLEPIXMAP drawn for a zero-width character. --- gtk/PlatGTK.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index b9e63c8ab..692735f45 100755 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -607,6 +607,8 @@ void SurfaceImpl::GradientRectangle(PRectangle rc, const std::vector void SurfaceImpl::DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) { PLATFORM_ASSERT(context); + if (width == 0) + return; if (rc.Width() > width) rc.left += (rc.Width() - width) / 2; rc.right = rc.left + width; -- cgit v1.2.3