summaryrefslogtreecommitdiff
path: root/pango/break.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/break.c')
-rw-r--r--pango/break.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/pango/break.c b/pango/break.c
index 043ac0cc..d348f9b8 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1721,16 +1721,10 @@ break_attrs (const char *text,
if (attr->klass->type == PANGO_ATTR_ALLOW_BREAKS)
pango_attr_list_insert (&list, pango_attribute_copy (attr));
- if (attr->klass->type == PANGO_ATTR_INSERT_HYPHENS)
+ else if (attr->klass->type == PANGO_ATTR_INSERT_HYPHENS)
pango_attr_list_insert (&hyphens, pango_attribute_copy (attr));
}
- if (!_pango_attr_list_has_attributes (&list))
- {
- _pango_attr_list_destroy (&list);
- return FALSE;
- }
-
_pango_attr_list_get_iterator (&list, &iter);
do {
const PangoAttribute *attr = pango_attr_iterator_get (&iter, PANGO_ATTR_ALLOW_BREAKS);
@@ -1790,6 +1784,8 @@ break_attrs (const char *text,
}
} while (pango_attr_iterator_next (&iter));
+ _pango_attr_iterator_destroy (&iter);
+
_pango_attr_list_destroy (&list);
_pango_attr_list_destroy (&hyphens);