From 1b2f64917e88a89dbdad4225fd5ab7b44b53ede4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 20 May 2020 13:28:18 +0200 Subject: [PATCH] format: handle NULL type info --- spa/include/spa/debug/format.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/include/spa/debug/format.h b/spa/include/spa/debug/format.h index 0ae48c1ef..421c7a064 100644 --- a/spa/include/spa/debug/format.h +++ b/spa/include/spa/debug/format.h @@ -163,7 +163,7 @@ static inline int spa_debug_format(int indent, rindex(spa_types[type].name, ':') + 1); if (choice == SPA_CHOICE_None) { - spa_debug_format_value(ti->values, type, vals, size); + spa_debug_format_value(ti ? ti->values : NULL, type, vals, size); } else { const char *ssep, *esep, *sep; @@ -189,7 +189,7 @@ static inline int spa_debug_format(int indent, vals = SPA_MEMBER(vals, size, void); if (i > 1) fprintf(stderr, "%s", sep); - spa_debug_format_value(ti->values, type, vals, size); + spa_debug_format_value(ti ? ti->values : NULL, type, vals, size); } fprintf(stderr, "%s", esep); }