From c276c6883d75d8c4402cd00f63c961213bbcbbf1 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 4 Jan 2021 14:58:59 +0100 Subject: Fixed initializing the cChannel::schedule pointer after reading EPG data with PUTE --- epg.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'epg.c') diff --git a/epg.c b/epg.c index 5d2980c9..206b8ee5 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 and Rolf Hakenes . * - * $Id: epg.c 4.9 2019/05/20 09:55:22 kls Exp $ + * $Id: epg.c 4.9.1.1 2021/01/04 14:58:58 kls Exp $ */ #include "epg.h" @@ -1311,8 +1311,13 @@ bool cSchedules::Read(FILE *f) fclose(f); if (result) { // Initialize the channels' schedule pointers, so that the first WhatsOn menu will come up faster: - for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) + for (cChannel *Channel = Channels->First(); Channel; Channel = Channels->Next(Channel)) { + if (const cSchedule *Schedule = Channel->schedule) { + if (!Schedule->ChannelID().Valid()) // this is the DummySchedule + Channel->schedule = NULL; + } Schedules->GetSchedule(Channel); + } } return result; } -- cgit v1.2.3