From 1f8564ffaebdc67313559d29521535d6905322e1 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 21 Sep 2021 16:55:18 +0930 Subject: [PATCH] type_to_string: detect type failure in DEVELOPER mode. Signed-off-by: Rusty Russell --- common/type_to_string.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/type_to_string.c b/common/type_to_string.c index 82affe9f0..c1642f1e1 100644 --- a/common/type_to_string.c +++ b/common/type_to_string.c @@ -33,6 +33,9 @@ const char *type_to_string_(const tal_t *ctx, const char *typename, break; } } +#if DEVELOPER + assert(s); +#endif if (!s) s = tal_fmt(ctx, "UNKNOWN TYPE %s", typename);