[pango/wip/baedert/for-master: 2/3] test-common: Ignore null attr lists



commit 46e6994ac7cc24cb985f89d91986e189a55c9c2a
Author: Timm Bäder <mail baedert org>
Date:   Fri Apr 17 21:18:25 2020 +0200

    test-common: Ignore null attr lists
    
    pango_layout_get_attributes() is explicitly nullable but not every
    caller handles that case.

 tests/test-common.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/tests/test-common.c b/tests/test-common.c
index 608b405c..786973f1 100644
--- a/tests/test-common.c
+++ b/tests/test-common.c
@@ -151,6 +151,9 @@ print_attr_list (PangoAttrList *attrs, GString *string)
 {
   PangoAttrIterator *iter;
 
+  if (!attrs)
+    return;
+
   iter = pango_attr_list_get_iterator (attrs);
   do {
     gint start, end;


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