diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2012-05-19 16:38:19 +0200 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2012-05-19 16:38:19 +0200 |
commit | ec0e8f0f77a63956f09165ce562b98d0c5088245 (patch) | |
tree | 5ab50ab35e48774f63b59a2c0d59c479417fc65e | |
parent | f5e42588e52a407c71dc8b933592864908e3a67b (diff) | |
download | vdr-plugin-eepg-ec0e8f0f77a63956f09165ce562b98d0c5088245.tar.gz vdr-plugin-eepg-ec0e8f0f77a63956f09165ce562b98d0c5088245.tar.bz2 |
check if channel valid before sort
-rw-r--r-- | eepg.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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) { |