[pango/wip/baedert/for-master: 49/61] break: Only call break_attrs if we really have attributes



commit fe10183057fd3be26e16b442d4127697d47f4ab3
Author: Timm Bäder <mail baedert org>
Date:   Fri Apr 17 08:34:27 2020 +0200

    break: Only call break_attrs if we really have attributes

 pango/break.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pango/break.c b/pango/break.c
index 26a79873..58bf2f90 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1597,7 +1597,7 @@ tailor_break (const char    *text,
 
   res = break_script (text, length, analysis, attrs, attrs_len);
 
-  if (item_offset >= 0)
+  if (item_offset >= 0 && analysis->extra_attrs)
     res |= break_attrs (text, length, analysis->extra_attrs, item_offset, attrs, attrs_len);
 
   return res;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]