[pango] layout: Don't free no_break_attributes prematurely
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] layout: Don't free no_break_attributes prematurely
- Date: Tue, 16 Jul 2019 17:54:51 +0000 (UTC)
commit 268f657b2410bc6880c061e62f7ff8a42cc5817a
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jul 16 13:53:45 2019 -0400
layout: Don't free no_break_attributes prematurely
We use them in a loop. Don't free them before
the loop is done.
pango/pango-layout.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index fb732d7d..e0725adc 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -4241,10 +4241,7 @@ pango_layout_check_lines (PangoLayout *layout)
iter);
if (no_break_attrs)
- {
- apply_no_break_attributes (state.items, no_break_attrs);
- pango_attr_list_unref (no_break_attrs);
- }
+ apply_no_break_attributes (state.items, no_break_attrs);
get_items_log_attrs (start, state.items,
layout->log_attrs + start_offset,
@@ -4297,6 +4294,9 @@ pango_layout_check_lines (PangoLayout *layout)
pango_attr_iterator_destroy (iter);
pango_attr_list_unref (attrs);
+ if (no_break_attrs)
+ pango_attr_list_unref (no_break_attrs);
+
if (no_shape_attrs)
{
apply_no_shape_attributes (layout, no_shape_attrs);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]