diff options
author | Timm Bäder <mail@baedert.org> | 2020-06-08 19:20:14 +0200 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2020-06-08 19:20:44 +0200 |
commit | ea6248f5195bcfb1f11a20c7edb5fae6ab85e64d (patch) | |
tree | f090900e0a46068127fadc08c4c2f3190a1b2e7a /pango/pango-layout.c | |
parent | 9b7b67f5e01397de03bf46bb5f8446c30952fb33 (diff) | |
download | pango-ea6248f5195bcfb1f11a20c7edb5fae6ab85e64d.tar.gz |
layout: Treat empty attr lists like NULL ones
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r-- | pango/pango-layout.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 11e14418..7824a3ce 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -685,9 +685,15 @@ pango_layout_set_attributes (PangoLayout *layout, g_return_if_fail (layout != NULL); + /* Both empty */ if (!attrs && !layout->attrs) return; + /* Also both empty */ + if (!_pango_attr_list_has_attributes (layout->attrs) && + !_pango_attr_list_has_attributes (attrs)) + return; + old_attrs = layout->attrs; /* We always clear lines such that this function can be called |