summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-10-06 22:37:40 +0200
committerlouis <louis.braun@gmx.de>2013-10-06 22:37:40 +0200
commit1af52dd83848d4f576f84dbf3871f7e670feb787 (patch)
treecc794085e77d8e8cf95d02df7851b5a6b7116c35
parent1d163810d6b2580cc970e0b84039f6aa05cc3a8c (diff)
downloadvdr-plugin-tvscraper-1af52dd83848d4f576f84dbf3871f7e670feb787.tar.gz
vdr-plugin-tvscraper-1af52dd83848d4f576f84dbf3871f7e670feb787.tar.bz2
Fixed a crash if a configured channel to scrap does not exist anymore
-rw-r--r--HISTORY2
-rw-r--r--worker.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/HISTORY b/HISTORY
index 7ef52d0..09d9fd4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -41,3 +41,5 @@ Version 0.0.5
- Fixed a crash if internet connection is not available
Version 0.1.0
+- Fixed a crash if a configured channel to scrap does not
+ exist anymore
diff --git a/worker.c b/worker.c
index c5d83f6..87203fa 100644
--- a/worker.c
+++ b/worker.c
@@ -131,6 +131,8 @@ void cTVScraperWorker::ScrapEPG(void) {
for (int i=0; i<numChannels; i++) {
string channelID = channels[i];
const cChannel *channel = Channels.GetByChannelID(tChannelID::FromString(channelID.c_str()));
+ if (!channel)
+ continue;
dsyslog("tvscraper: scraping Channel %s %s", channel->Name(), channelID.c_str());
cSchedulesLock schedulesLock;
const cSchedules *schedules = cSchedules::Schedules(schedulesLock);