Don't crash if we cannot figure out the adapter type when constructing the list of built-in dvb networks

This commit is contained in:
Andreas Öman 2009-11-18 19:03:56 +00:00
parent e651b7e07b
commit 8d4335cd89
2 changed files with 3 additions and 1 deletions

View file

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

View file

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