summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/whats_on.ecpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index 2db13ef..36a8f96 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -177,8 +177,10 @@ if (type == "now") {
time_t now = time(NULL);
for (SearchResults::iterator result = results.begin(); result != results.end(); ++result) {
long diff = result->StartTime() - now;
- if (labs(diff) >= 24*60*60) continue; // skip broadcasts more than a day away
- EpgInfoPtr epgEvent = EpgEvents::CreateEpgInfo(result->GetChannel(), result->GetEvent());
+ if (labs(diff) >= 24*60*60) continue; // skip broadcasts more than a day away
+ const cChannel* Channel = result->GetChannel();
+ if (!Channel) continue;
+ EpgInfoPtr epgEvent = EpgEvents::CreateEpgInfo(Channel, result->GetEvent(Channel));
eventList.push_back(epgEvent);
}
}