From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Tue, 20 Nov 2018 12:47:08 +0000 (+0000) Subject: api: Fix NULL blank argument. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0df43b15cc72091301a4293823cb04b19033beae;p=thirdparty%2Ftvheadend.git api: Fix NULL blank argument. The blank argument is NULL on several paths, so fix this to reference a local variable so we can lookup channel name properly. --- diff --git a/src/api/api_epg.c b/src/api/api_epg.c index 82d4760ce..b82489d97 100644 --- a/src/api/api_epg.c +++ b/src/api/api_epg.c @@ -74,7 +74,7 @@ api_epg_add_channel ( htsmsg_t *m, channel_t *ch, const char *blank ) static htsmsg_t * api_epg_entry ( epg_broadcast_t *eb, const char *lang, access_t *perm, const char **blank ) { - const char *s; + const char *s, *blank2 = NULL; char buf[64]; channel_t *ch = eb->channel; htsmsg_t *m, *m2; @@ -85,6 +85,8 @@ api_epg_entry ( epg_broadcast_t *eb, const char *lang, access_t *perm, const cha if (!ch) return NULL; + if (blank == NULL) + blank = &blank2; if (*blank == NULL) *blank = tvh_gettext_lang(lang, channel_blank_name);