summaryrefslogtreecommitdiff
path: root/epg.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-01-20 13:42:38 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-01-20 13:42:38 +0100
commitcd09f7a0dfad60a9451b30fc2c4261a3c867beee (patch)
tree871ce2bf1582a2c63a5968a3d02a57ea3cafd8db /epg.c
parentef385702d0d821f9d7efebef1e87d4e9da9db721 (diff)
downloadvdr-cd09f7a0dfad60a9451b30fc2c4261a3c867beee.tar.gz
vdr-cd09f7a0dfad60a9451b30fc2c4261a3c867beee.tar.bz2
Fixed a crash after executing the SVDRP command CLRE, caused by dangling 'schedule' pointers from cChannel objects
Diffstat (limited to 'epg.c')
-rw-r--r--epg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epg.c b/epg.c
index 79c11762..93104f0e 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.49 2006/01/15 13:58:30 kls Exp $
+ * $Id: epg.c 1.50 2006/01/20 13:42:38 kls Exp $
*/
#include "epg.h"
@@ -935,7 +935,10 @@ bool cSchedules::ClearAll(void)
cSchedulesLock SchedulesLock(true, 1000);
cSchedules *s = (cSchedules *)Schedules(SchedulesLock);
if (s) {
- s->Clear();
+ for (cTimer *Timer = Timers.First(); Timer; Timer = Timers.Next(Timer))
+ Timer->SetEvent(NULL);
+ for (cSchedule *Schedule = s->First(); Schedule; Schedule = s->Next(Schedule))
+ Schedule->Cleanup(INT_MAX);
return true;
}
return false;