diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-01-25 21:21:39 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-25 22:10:10 -0500 |
commit | 175d85d6d7c3976ab7fe616332040ae0fdce2201 (patch) | |
tree | 7c10345cda9601ca80bdc79081d6bb0f6cad8546 | |
parent | cb699f4966eb8c8eaac886fa8b35f531ddf4b257 (diff) | |
download | pango-175d85d6d7c3976ab7fe616332040ae0fdce2201.tar.gz |
line-breaker: Fix a corner case
We were sometimes leaving a stray glyphstring
behind when handling newlines in single paragraph
mode.
-rw-r--r-- | pango/pango-line-breaker.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pango/pango-line-breaker.c b/pango/pango-line-breaker.c index 05c905aa..90fe81bc 100644 --- a/pango/pango-line-breaker.c +++ b/pango/pango-line-breaker.c @@ -1116,6 +1116,7 @@ compute_log_widths (PangoLineBreaker *self) self->num_log_widths = item->num_chars; } + g_assert (self->log_widths_offset == 0); pango_glyph_item_get_logical_widths (&glyph_item, self->data->text, self->log_widths); } @@ -1244,6 +1245,7 @@ process_item (PangoLineBreaker *self, if (item_is_paragraph_separator (self, item)) { + g_clear_pointer (&self->glyphs, pango_glyph_string_free); return BREAK_PARAGRAPH_SEPARATOR; } |