summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {