epg: Correctly unlink from channels (avoid rearming timers causing segfault)

Fixes #553
Fixes #533
Fixes #513
This commit is contained in:
Andreas Öman 2011-06-08 23:04:33 +02:00
parent 24a833b8a1
commit f8710c712f

View file

@ -482,11 +482,12 @@ epg_unlink_from_channel(channel_t *ch)
{
event_t *e;
while((e = ch->ch_epg_events.root) != NULL)
epg_remove_event_from_channel(ch, e);
gtimer_disarm(&ch->ch_epg_timer_head);
gtimer_disarm(&ch->ch_epg_timer_current);
while((e = ch->ch_epg_events.root) != NULL)
epg_remove_event_from_channel(ch, e);
}