diff options
author | louis <louis.braun@gmx.de> | 2013-09-02 17:54:54 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-09-02 17:54:54 +0200 |
commit | 94a319d1a6ce1035a0d6187e414f2672a27b4ddf (patch) | |
tree | 7199a3e727d4b310e7264e5f4c07bed8fcf13104 | |
parent | 4ca2771415b5a40609757bf65b07b77108bce6ff (diff) | |
download | vdr-plugin-tvscraper-94a319d1a6ce1035a0d6187e414f2672a27b4ddf.tar.gz vdr-plugin-tvscraper-94a319d1a6ce1035a0d6187e414f2672a27b4ddf.tar.bz2 |
fixed null pointer access
-rw-r--r-- | imageserver.c | 3 | ||||
-rw-r--r-- | themoviedbscraper/themoviedbscraper.c | 2 | ||||
-rw-r--r-- | thetvdbscraper/thetvdbscraper.c | 2 | ||||
-rw-r--r-- | worker.c | 3 |
4 files changed, 6 insertions, 4 deletions
diff --git a/imageserver.c b/imageserver.c index f638355..b6d8414 100644 --- a/imageserver.c +++ b/imageserver.c @@ -12,7 +12,8 @@ cImageServer::~cImageServer() { scrapType cImageServer::GetScrapType(const cEvent *event) { scrapType type = scrapNone; - type = overrides->Type(event->Title()); + string title = (event->Title())?event->Title():""; + type = overrides->Type(title); if (type != scrapNone) return type; int duration = event->Duration() / 60; diff --git a/themoviedbscraper/themoviedbscraper.c b/themoviedbscraper/themoviedbscraper.c index aadbb72..978c0f6 100644 --- a/themoviedbscraper/themoviedbscraper.c +++ b/themoviedbscraper/themoviedbscraper.c @@ -23,7 +23,7 @@ cMovieDBScraper::~cMovieDBScraper() { }
void cMovieDBScraper::Scrap(const cEvent *event, int recordingID) {
- string movieName = event->Title();
+ string movieName = (event->Title())?event->Title():"";
if (overrides->Ignore(movieName)) {
return;
}
diff --git a/thetvdbscraper/thetvdbscraper.c b/thetvdbscraper/thetvdbscraper.c index f4b4b83..4e16a03 100644 --- a/thetvdbscraper/thetvdbscraper.c +++ b/thetvdbscraper/thetvdbscraper.c @@ -24,7 +24,7 @@ cTVDBScraper::~cTVDBScraper() { }
void cTVDBScraper::Scrap(const cEvent *event, int recordingID) {
- string seriesName = event->Title();
+ string seriesName = (event->Title())?event->Title():"";
if (overrides->Ignore(seriesName)) {
return;
}
@@ -79,7 +79,8 @@ void cTVScraperWorker::SetDirectories(void) { scrapType cTVScraperWorker::GetScrapType(const cEvent *event) { scrapType type = scrapNone; - type = overrides->Type(event->Title()); + string title = (event->Title())?event->Title():""; + type = overrides->Type(title); if (type != scrapNone) return type; int duration = event->Duration() / 60; |