summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pango/pango-layout.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 9452c9b8..791c3db7 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -2144,7 +2144,11 @@ pango_layout_index_to_pos (PangoLayout *layout,
{
/* index is in the paragraph delimiters, move to
* end of previous line
+ *
+ * This shouldn’t occur in the first loop iteration as the first
+ * line’s start_index should always be 0.
*/
+ g_assert (layout_line != NULL);
index = layout_line->start_index + layout_line->length;
break;
}