]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epg: fix _epg_broadcast_updated for event without assigned channel, fixes #3251
authorJaroslav Kysela <perex@perex.cz>
Mon, 2 Nov 2015 16:21:50 +0000 (17:21 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 2 Nov 2015 16:21:50 +0000 (17:21 +0100)
src/channels.c
src/download.c
src/epg.c

index 9ffd20bc9330d66010562729a31d720aeef704f9..9838db6695820f940a79383e98087f05097c2be1 100644 (file)
@@ -937,8 +937,9 @@ channel_delete ( channel_t *ch, int delconf )
 void
 channel_save ( channel_t *ch )
 {
-  htsmsg_t *c = htsmsg_create_map();
+  htsmsg_t *c;
   if (ch->ch_dont_save == 0) {
+    c = htsmsg_create_map();
     idnode_save(&ch->ch_id, c);
     hts_settings_save(c, "channel/config/%s", idnode_uuid_as_sstr(&ch->ch_id));
     htsmsg_destroy(c);
index f042f90df6cc51673084bc42280437b48a2f0d01..b77c3477fb062d7843a008d0c7c683732ae5afeb 100644 (file)
@@ -208,8 +208,10 @@ download_start( download_t *dn, const char *url, void *aux )
     http_client_close(dn->http_client);
     dn->http_client = NULL;
   }
-  if (url)
+  if (url) {
+    free(dn->url);
     dn->url = strdup(url);
+  }
   dn->aux = aux;
   gtimer_arm(&dn->fetch_timer, download_fetch, dn, 0);
 }
index e3ed6db7abdd702e3a4cd18a2bc21f467247dba3..409f7d09b74393625fa3078f83620f52d679f50d 100644 (file)
--- a/src/epg.c
+++ b/src/epg.c
@@ -1607,9 +1607,11 @@ static void _epg_broadcast_updated ( void *eo )
     htsp_event_add(eo);
     notify_delayed(id, "epg", "create");
   }
-  dvr_event_updated(eo);
-  dvr_autorec_check_event(eo);
-  channel_event_updated(eo);
+  if (ebc->channel) {
+    dvr_event_updated(eo);
+    dvr_autorec_check_event(eo);
+    channel_event_updated(eo);
+  }
 }
 
 static epg_broadcast_t **_epg_broadcast_skel ( void )