summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-27 13:03:52 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-07-27 13:03:52 -0400
commitcc98d82901753e930f45fc94c5a28fd2a96f6857 (patch)
tree3b8df30509a870acf9314e241fb2057d22600945
parent9a79369d764b0274b6cd7ffb43391d9de0ad3832 (diff)
downloadpango-cc98d82901753e930f45fc94c5a28fd2a96f6857.tar.gz
Fix a crash with line break control
We were forgetting to copy allow-break attributes, causing them to be prematurely freed. Oops.
-rw-r--r--pango/break.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/break.c b/pango/break.c
index 356c5afe..abaf7d9b 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1921,7 +1921,7 @@ break_attrs (const char *text,
PangoAttribute *attr = l->data;
if (attr->klass->type == PANGO_ATTR_ALLOW_BREAKS)
- pango_attr_list_insert (list, (PangoAttribute*)l->data);
+ pango_attr_list_insert (list, pango_attribute_copy (attr));
}
iter = pango_attr_list_get_iterator (list);