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.
This commit is contained in:
Adam Sutton 2013-06-14 23:14:35 +01:00
parent bce864a879
commit ca74acd8c3

View file

@ -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));