[pango/pango2: 78/135] line-breaker: Fix a corner case
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango2: 78/135] line-breaker: Fix a corner case
- Date: Fri, 18 Feb 2022 20:11:01 +0000 (UTC)
commit 18eeea2b476a26ece581b29d54ab37294fa11ec3
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 25 21:21:39 2022 -0500
line-breaker: Fix a corner case
We were sometimes leaving a stray glyphstring
behind when handling newlines in single paragraph
mode.
pango/pango-line-breaker.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/pango/pango-line-breaker.c b/pango/pango-line-breaker.c
index 19658438..0a7a6de3 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]