summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-12-27 10:53:46 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2021-12-27 10:53:46 +0100
commit1861074241f1a6ee71372ce3cd474f19a4a2867c (patch)
tree0127f236368b168205c5caeb114dfa6ee05e9f6d
parent178f2cacf90c31398cb397f4300375ba1b82f766 (diff)
downloadvdr-1861074241f1a6ee71372ce3cd474f19a4a2867c.tar.gz
vdr-1861074241f1a6ee71372ce3cd474f19a4a2867c.tar.bz2
Fixed a possible crash in the Schedule menu, in case Setup.EPGLinger is 0
-rw-r--r--HISTORY4
-rw-r--r--epg.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/HISTORY b/HISTORY
index 09268943..81001413 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9574,3 +9574,7 @@ Video Disk Recorder Revision History
- Fixed initializing the cChannel::schedule pointer after reading EPG data with PUTE
(reported by Manuel Reimer).
- Official release.
+
+2021-12-27:
+
+- Fixed a possible crash in the Schedule menu, in case Setup.EPGLinger is 0.
diff --git a/epg.c b/epg.c
index 206b8ee5..67b87d35 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 4.9.1.1 2021/01/04 14:58:58 kls Exp $
+ * $Id: epg.c 4.9.1.2 2021/12/27 10:52:38 kls Exp $
*/
#include "epg.h"
@@ -1347,6 +1347,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());