[pango/fix-pango-attr-list-equals] Fix a crash in pango_attr_list_equal



commit 4db48c7e71c1c79e9b5c27d432cee472662935ce
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jun 10 17:28:39 2020 -0400

    Fix a crash in pango_attr_list_equal
    
    When allowing attributes to be NULL, we need
    to take that into account here too.

 pango/pango-attributes.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index 800c2dec..1fa8c399 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -1869,6 +1869,9 @@ pango_attr_list_equal (PangoAttrList *list,
   if (list == NULL || other_list == NULL)
     return FALSE;
 
+  if (list->attributes == NULL || other_list->attributes == NULL)
+    return list->attributes == other_list->attributes;
+
   attrs = list->attributes;
   other_attrs = other_list->attributes;
 


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