diff --git a/src/epggrab/module/eit.c b/src/epggrab/module/eit.c index 2eeb2c08..d2e5d54a 100644 --- a/src/epggrab/module/eit.c +++ b/src/epggrab/module/eit.c @@ -622,12 +622,14 @@ _eit_callback goto done; /* Register this */ - SKEL_ALLOC(svc_link_skel); - svc_link_skel->uuid = (char*)idnode_uuid_as_str(&svc->s_id); - osl = RB_INSERT_SORTED(&ota->om_svcs, svc_link_skel, link, osl_cmp); - if (!osl) { - svc_link_skel->uuid = strdup(svc_link_skel->uuid); - SKEL_USED(svc_link_skel); + if (ota) { + SKEL_ALLOC(svc_link_skel); + svc_link_skel->uuid = (char*)idnode_uuid_as_str(&svc->s_id); + osl = RB_INSERT_SORTED(&ota->om_svcs, svc_link_skel, link, osl_cmp); + if (!osl) { + svc_link_skel->uuid = strdup(svc_link_skel->uuid); + SKEL_USED(svc_link_skel); + } } /* No point processing */ diff --git a/src/epggrab/otamux.c b/src/epggrab/otamux.c index 4d48f6fd..015bd451 100644 --- a/src/epggrab/otamux.c +++ b/src/epggrab/otamux.c @@ -210,6 +210,7 @@ epggrab_ota_register tvhinfo(mod->id, "registering mux %s", buf); ota = epggrab_ota_mux_skel; SKEL_USED(epggrab_ota_mux_skel); + RB_INIT(&ota->om_svcs); ota->om_mux_uuid = strdup(uuid); ota->om_when = dispatch_clock + epggrab_ota_timeout(ota); ota->om_active = 1; @@ -412,6 +413,7 @@ epggrab_ota_load_one } ota = calloc(1, sizeof(epggrab_ota_mux_t)); + RB_INIT(&ota->om_svcs); ota->om_mux_uuid = strdup(uuid); ota->om_timeout = htsmsg_get_u32_or_default(c, "timeout", 0); ota->om_interval = htsmsg_get_u32_or_default(c, "interval", 0);