From 10ffd08c826e2e49cf012a62977cc5ccf0be2d1c Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Thu, 29 Apr 2021 09:19:58 +0200 Subject: Fixed a possible crash in the Schedule menu, in case Setup.EPGLinger is 0 --- epg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'epg.c') diff --git a/epg.c b/epg.c index 7178d740..d917e669 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 5.5 2021/04/28 20:44:56 kls Exp $ + * $Id: epg.c 5.6 2021/04/29 09:19:58 kls Exp $ */ #include "epg.h" @@ -1385,6 +1385,8 @@ const cSchedule *cSchedules::GetSchedule(const cChannel *Channel, bool AddIfMiss { // This is not very beautiful, but it dramatically speeds up the // "What's on now/next?" menus. + if (!Channel) + return NULL; static cSchedule DummySchedule(tChannelID::InvalidID); if (!Channel->schedule) Channel->schedule = GetSchedule(Channel->GetChannelID()); -- cgit v1.2.3