From 8c21f7d47998ffc1c2c6568226eb693b0a918c7a Mon Sep 17 00:00:00 2001 From: Jasmin Jessich Date: Thu, 18 May 2017 23:09:38 +0200 Subject: Fixed lock order in SearchResult::GetEvent - SearchResult::GetEvent has now a new parameter Channel - Call EpgEvents::CreateEpgInfo only, if a Channel has been found. --- pages/whats_on.ecpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pages') 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); } } -- cgit v1.2.3