From ca74acd8c398dfdd4165415e794cdf1154b45de1 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Fri, 14 Jun 2013 23:14:35 +0100 Subject: [PATCH] idnode: add protection against NULL title This shouldn't really happen (and I need to look at why it is) but also best to have protection against it anyway. --- src/idnode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idnode.c b/src/idnode.c index bb8833bb..bdf57bc6 100644 --- a/src/idnode.c +++ b/src/idnode.c @@ -638,7 +638,7 @@ idnode_serialize0(idnode_t *self, int optmask) uuid = idnode_uuid_as_str(self); htsmsg_add_str(m, "uuid", uuid); htsmsg_add_str(m, "id", uuid); - htsmsg_add_str(m, "text", idnode_get_title(self)); + htsmsg_add_str(m, "text", idnode_get_title(self) ?: ""); htsmsg_add_msg(m, "params", idnode_params(idc, self, optmask));