[pango/wip/baedert/for-master: 2/3] test-common: Ignore null attr lists
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [pango/wip/baedert/for-master: 2/3] test-common: Ignore null attr lists
- Date: Fri, 17 Apr 2020 19:44:08 +0000 (UTC)
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]