From bafd553834d4eb01f444a34f68d6f4b1e08a700d Mon Sep 17 00:00:00 2001 From: Jasmin Jessich Date: Fri, 16 Jun 2017 23:45:56 +0200 Subject: Add epginfo.epgTools only if it is an event - This fixes the problem reported by 3PO http://www.vdr-portal.de/board16-video-disk-recorder/board55-vdr-plugins/p1293462-vdr-plugin-live-f%C3%BCr-vdr-2-3-x/#post1293462 --- pages/epginfo.ecpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'pages') diff --git a/pages/epginfo.ecpp b/pages/epginfo.ecpp index 939c4ae..362e5f8 100644 --- a/pages/epginfo.ecpp +++ b/pages/epginfo.ecpp @@ -50,7 +50,9 @@ using namespace std; bool aboutBox = false; -#if VDRVERSNUM < 20301 +#if VDRVERSNUM >= 20301 + bool isEvent = false; +#else // One of these get initialized when needed. When freed by getting // out of scope they will release (if initialized) important // Semaphores/Locks. @@ -81,6 +83,7 @@ using namespace std; LOCK_CHANNELS_READ; LOCK_SCHEDULES_READ; epgEvent = EpgEvents::CreateEpgInfo(epgid, Schedules); + isEvent = true; #else schedulesLockPtr = SchedulesLockPtr(new SchedulesLock); if (!schedulesLockPtr) { @@ -131,11 +134,10 @@ using namespace std; if (recordings) { tools_component = epgEvent->Archived().empty() ? "recordings.rec_tools" : "recordings.archived_disc" ; } -#if VDRVERSNUM < 20301 - if (schedulesLockPtr) +#if VDRVERSNUM >= 20301 + if (isEvent) #else - // for VDR 2.3.x we don't need to check something, because we can be sure - // we got the Schedule lock above + if (schedulesLockPtr) #endif tools_component = "epginfo.epgTools"; -- cgit v1.2.3