From dc5e67b2d74386f6482f6b978f972c4bfd8401cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 10 Jun 2020 05:54:01 +0200 Subject: pango-layout: Help static analysis a bit Make sure we have a valid iter here, which is of course always the case in reality. --- pango/pango-layout.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 6d4d94cb..97e24d1b 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -2090,6 +2090,8 @@ pango_layout_xy_to_index (PangoLayout *layout, PangoRectangle line_logical; int first_y, last_y; + g_assert (!ITER_IS_INVALID (&iter)); + pango_layout_iter_get_line_extents (&iter, NULL, &line_logical); pango_layout_iter_get_line_yrange (&iter, &first_y, &last_y); -- cgit v1.2.1