]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Check for null pointers
authorJohn Törnblom <john.tornblom@gmail.com>
Mon, 5 Mar 2012 16:52:38 +0000 (17:52 +0100)
committerJohn Törnblom <john.tornblom@gmail.com>
Mon, 5 Mar 2012 16:52:38 +0000 (17:52 +0100)
src/webui/webui.c

index 58ea8e006c1a69c135cd4e85db840cb8d85d1cf1..b8d16fb7d9f56387a78e907672ee3855c85aece9 100644 (file)
@@ -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;