From: Andreas Ă–man Date: Wed, 18 Nov 2009 19:03:56 +0000 (+0000) Subject: Don't crash if we cannot figure out the adapter type when constructing the list of... X-Git-Tag: 2.12~415 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d4335cd89a94f73da3c4ef9778e342f71fbb50f;p=thirdparty%2Ftvheadend.git Don't crash if we cannot figure out the adapter type when constructing the list of built-in dvb networks --- diff --git a/src/dvb/dvb_preconf.c b/src/dvb/dvb_preconf.c index d58ee151c..21148c9b6 100644 --- a/src/dvb/dvb_preconf.c +++ b/src/dvb/dvb_preconf.c @@ -183,6 +183,7 @@ dvb_mux_preconf_get_node(int fetype, const char *node) nr = sizeof(regions_ATSC) / sizeof(regions_ATSC[0]); break; default: + tvhlog(LOG_ERR, "DVB", "No built-in config for fetype %d", fetype); return NULL; } diff --git a/src/webui/extjs.c b/src/webui/extjs.c index 29ae6aaa2..0ebf368ea 100644 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -468,7 +468,8 @@ extjs_dvbnetworks(http_connection_t *hc, const char *remain, void *opaque) pthread_mutex_unlock(&global_lock); - out = dvb_mux_preconf_get_node(tda->tda_type, s); + if((out = dvb_mux_preconf_get_node(tda->tda_type, s)) == NULL) + return 404; htsmsg_json_serialize(out, hq, 0); htsmsg_destroy(out);