summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-16 13:53:45 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-07-16 13:54:38 -0400
commit268f657b2410bc6880c061e62f7ff8a42cc5817a (patch)
treeeff7bcf5572fc9a4f72ae4483c6cc97ddf36c165
parentd9569d06cf3b3027ab4f9512703a56745d7074cc (diff)
downloadpango-268f657b2410bc6880c061e62f7ff8a42cc5817a.tar.gz
layout: Don't free no_break_attributes prematurely
We use them in a loop. Don't free them before the loop is done.
-rw-r--r--pango/pango-layout.c8
1 files 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);