From 3cea8ad970c72848a5a86459940721539c9c9308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20T=C3=B6rnblom?= Date: Mon, 5 Mar 2012 17:52:38 +0100 Subject: [PATCH] Check for null pointers --- src/webui/webui.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/webui/webui.c b/src/webui/webui.c index 58ea8e00..b8d16fb7 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -178,13 +178,16 @@ http_stream_run(http_connection_t *hc, streaming_queue_t *sq, th_subscription_t break; case SMT_START: { + event_t *e = NULL; tvhlog(LOG_DEBUG, "webui", "Start streaming %s", hc->hc_url_orig); + if(s->ths_service->s_servicetype == ST_RADIO) http_output_content(hc, "audio/x-matroska"); else http_output_content(hc, "video/x-matroska"); - event_t *e = s->ths_channel->ch_epg_current; + if(s->ths_channel) + e = s->ths_channel->ch_epg_current; mkm = mk_mux_stream_create(hc->hc_fd, sm->sm_data, e); break;