[pango/wip/baedert/for-master] break_attrs: Bail out if we have no ALLOW_BREAKS attributes
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/wip/baedert/for-master] break_attrs: Bail out if we have no ALLOW_BREAKS attributes
- Date: Fri, 17 Apr 2020 06:36:32 +0000 (UTC)
commit dcfb8ba0dd562b7be71879b4cf7e3295251a50d9
Author: Timm Bäder <mail baedert org>
Date: Fri Apr 17 08:22:04 2020 +0200
break_attrs: Bail out if we have no ALLOW_BREAKS attributes
pango/break.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/pango/break.c b/pango/break.c
index 5af260f8..501cadf3 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1928,6 +1928,12 @@ break_attrs (const char *text,
pango_attr_list_insert (&list, 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 {
PangoAttribute *attr;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]