summaryrefslogtreecommitdiff
path: root/eepg.c
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2012-05-19 14:38:19 (GMT)
committerDimitar Petrovski <dimeptr@gmail.com>2012-05-19 14:38:19 (GMT)
commitec0e8f0f77a63956f09165ce562b98d0c5088245 (patch)
tree5ab50ab35e48774f63b59a2c0d59c479417fc65e /eepg.c
parentf5e42588e52a407c71dc8b933592864908e3a67b (diff)
downloadvdr-plugin-eepg-ec0e8f0f77a63956f09165ce562b98d0c5088245.tar.gz
vdr-plugin-eepg-ec0e8f0f77a63956f09165ce562b98d0c5088245.tar.bz2
check if channel valid before sort
Diffstat (limited to 'eepg.c')
-rw-r--r--eepg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/eepg.c b/eepg.c
index fb48110..7ad3743 100644
--- a/eepg.c
+++ b/eepg.c
@@ -1155,9 +1155,12 @@ void sortSchedules(cSchedules * Schedules, tChannelID channelID){
LogD(3, prep("Start sortEquivalent %s"), *channelID.ToString());
cChannel *pChannel = GetChannelByID (channelID, false);
- cSchedule *pSchedule = (cSchedule *) Schedules->GetSchedule (pChannel, true);
- pSchedule->Sort ();
- Schedules->SetModified (pSchedule);
+ cSchedule *pSchedule;
+ if (pChannel) {
+ pSchedule = (cSchedule *) Schedules->GetSchedule (pChannel, true);
+ pSchedule->Sort ();
+ Schedules->SetModified (pSchedule);
+ }
ret = equiChanMap.equal_range(*channelID.ToString());
for (it=ret.first; it!=ret.second; ++it) {