summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-21 23:40:29 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-08-21 23:40:29 +0000
commit44274621a83fd473f5efe5604bd7ea952408dc79 (patch)
tree5738848fc5b533bfffb677bd3057ad59d7e407f2
parent1ac4f5d3dc9d88abb6f0a196291449c244f39b71 (diff)
parentb823774b132e1cddd6e4a8a423761c5c15375753 (diff)
downloadpango-44274621a83fd473f5efe5604bd7ea952408dc79.tar.gz
Merge branch 'renderer-crash' into 'main'
renderer: Don't divide by zero Closes #599 See merge request GNOME/pango!425
-rw-r--r--pango/pango-renderer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/pango-renderer.c b/pango/pango-renderer.c
index f575707f..21d09573 100644
--- a/pango/pango-renderer.c
+++ b/pango/pango-renderer.c
@@ -284,7 +284,7 @@ draw_strikethrough (PangoRenderer *renderer,
PangoRectangle *rect = &state->strikethrough_rect;
int num_glyphs = state->strikethrough_glyphs;
- if (state->strikethrough)
+ if (state->strikethrough && num_glyphs > 0)
pango_renderer_draw_rectangle (renderer,
PANGO_RENDER_PART_STRIKETHROUGH,
rect->x,