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. --- doc/ScintillaHistory.html | 4 ++++ gtk/PlatGTK.cxx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 069a2cf5c..975dc8d04 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -595,6 +595,10 @@ Bug #2401.
  • + For GTK, fix assertion failure on some systems when an INDIC_SQUIGGLEPIXMAP drawn + for a zero-width character. +
  • +
  • For Qt, allow parent window to handle context menu events by setting as ignored. Bug #2395.
  • 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