Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
prop: list might be called on idclass without an idnode
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
  • Loading branch information
swegener authored and perexg committed Nov 14, 2015
1 parent 63538db commit 8921df2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/input/mpegts/mpegts_input.c
Expand Up @@ -96,6 +96,9 @@ mpegts_input_class_network_enum ( void *obj, const char *lang )
{
htsmsg_t *p, *m;

if (!obj)
return NULL;

p = htsmsg_create_map();
htsmsg_add_str (p, "uuid", idnode_uuid_as_sstr((idnode_t*)obj));
htsmsg_add_bool(p, "enum", 1);
Expand Down
7 changes: 5 additions & 2 deletions src/prop.c
Expand Up @@ -484,8 +484,11 @@ prop_serialize_value
htsmsg_add_bool(m, "multiline", 1);

/* Enum list */
if (pl->list)
htsmsg_add_msg(m, "enum", pl->list(obj, lang));
if (pl->list) {
htsmsg_t *list = pl->list(obj, lang);
if (list)
htsmsg_add_msg(m, "enum", list);
}

/* Visual group */
if (pl->group)
Expand Down

0 comments on commit 8921df2

Please sign in to comment.