Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
channels: fix the destroy sequence for the epg linked channels
  • Loading branch information
perexg committed Dec 6, 2016
1 parent 715f51c commit 48b9f49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/channels.c
Expand Up @@ -1061,6 +1061,11 @@ channel_delete ( channel_t *ch, int delconf )
/* EPG */
epggrab_channel_rem(ch);
epg_channel_unlink(ch);
if (ch->ch_epg_parent) {
LIST_REMOVE(ch, ch_epg_slave_link);
free(ch->ch_epg_parent);
ch->ch_epg_parent = NULL;
}
for (ch1 = LIST_FIRST(&ch->ch_epg_slaves); ch1; ch1 = ch2) {
ch2 = LIST_NEXT(ch1, ch_epg_slave_link);
LIST_REMOVE(ch1, ch_epg_slave_link);
Expand Down

0 comments on commit 48b9f49

Please sign in to comment.