summaryrefslogtreecommitdiff
path: root/pango/pango-layout.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-06-10 05:54:01 +0200
committerTimm Bäder <mail@baedert.org>2020-06-10 05:54:01 +0200
commitdc5e67b2d74386f6482f6b978f972c4bfd8401cf (patch)
tree76ec6913864fa84d554a1e8a7d4df483ea226c95 /pango/pango-layout.c
parent3c5c50d547e4ca81696b16dffe34741611f094eb (diff)
downloadpango-dc5e67b2d74386f6482f6b978f972c4bfd8401cf.tar.gz
pango-layout: Help static analysis a bit
Make sure we have a valid iter here, which is of course always the case in reality.
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r--pango/pango-layout.c2
1 files changed, 2 insertions, 0 deletions
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);