[pango/wip/baedert/for-master2: 10/17] break_attrs: Bail out if we have no ALLOW_BREAKS attributes



commit cc5b6c7af26bbeb7862a978606ed4ac17b82c233
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 432ff493..2f5ff02e 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1919,6 +1919,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]