From 64b43dd060967a710afdd8d558257a280088fb72 Mon Sep 17 00:00:00 2001 From: lisa neigut Date: Fri, 26 Jul 2019 18:03:26 -0500 Subject: [PATCH] wire-gen: allow NULL for a tlv record in towire Allowing signaling of no TLV with NULL --- wire/tlvstream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wire/tlvstream.c b/wire/tlvstream.c index 1c4262284..23c4c75ae 100644 --- a/wire/tlvstream.c +++ b/wire/tlvstream.c @@ -143,6 +143,9 @@ void towire_tlvs(u8 **pptr, size_t num_types, const void *record) { + if (!record) + return; + for (size_t i = 0; i < num_types; i++) { u8 *val; if (i != 0)