aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk
diff options
context:
space:
mode:
authorEnrico Tröger <unknown>2023-09-13 08:06:51 +1000
committerEnrico Tröger <unknown>2023-09-13 08:06:51 +1000
commitc10733bd9897aef1e775399a70ae5e2684754ee2 (patch)
tree0caf399357353fad3f339edbbf66c3f0fba0be45 /gtk
parent262c93dd25c448bc605cb65378329533c9cbe0ef (diff)
downloadscintilla-mirror-c10733bd9897aef1e775399a70ae5e2684754ee2.tar.gz
Fix assertion failure on some systems when an INDIC_SQUIGGLEPIXMAP drawn for a
zero-width character.
Diffstat (limited to 'gtk')
-rwxr-xr-xgtk/PlatGTK.cxx2
1 files changed, 2 insertions, 0 deletions
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<ColourStop>
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;