From f8710c712f45157999e19aef92661686a0f612d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Wed, 8 Jun 2011 23:04:33 +0200 Subject: [PATCH] epg: Correctly unlink from channels (avoid rearming timers causing segfault) Fixes #553 Fixes #533 Fixes #513 --- src/epg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/epg.c b/src/epg.c index aac82ea9..e1d5afdd 100644 --- a/src/epg.c +++ b/src/epg.c @@ -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); }