summaryrefslogtreecommitdiff
path: root/menu_templateedit.c
diff options
context:
space:
mode:
authorFrank Neumann <fnu@yavdr.org>2017-05-01 11:02:21 +0200
committerFrank Neumann <fnu@yavdr.org>2017-05-01 11:02:21 +0200
commita46c7161bddc00b5b11bda0f8a14066b5f837302 (patch)
tree48e50b78f0efb1120b39bfb07f3612aabb1541e6 /menu_templateedit.c
parent0b09f90f361454d1d422cc750ee84359f11bd378 (diff)
downloadvdr-plugin-epgsearch-a46c7161bddc00b5b11bda0f8a14066b5f837302.tar.gz
vdr-plugin-epgsearch-a46c7161bddc00b5b11bda0f8a14066b5f837302.tar.bz2
Add compatibility for VDR 2.3.2+ (thx kamel5, mini73 & TomJoad)
Diffstat (limited to 'menu_templateedit.c')
-rw-r--r--menu_templateedit.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/menu_templateedit.c b/menu_templateedit.c
index f1c02b3..fc7d9c3 100644
--- a/menu_templateedit.c
+++ b/menu_templateedit.c
@@ -187,7 +187,13 @@ eOSState cMenuEditTemplate::ProcessKey(eKeys Key)
case kOk:
if (data.useChannel==1)
{
- cChannel *ch = Channels.GetByNumber(channelMin);
+#if VDRVERSNUM > 20300
+ LOCK_CHANNELS_READ;
+ const cChannels *vdrchannels = Channels;
+#else
+ cChannels *vdrchannels = &Channels;
+#endif
+ const cChannel *ch = vdrchannels->GetByNumber(channelMin);
if (ch)
data.channelMin = ch;
else
@@ -195,7 +201,7 @@ eOSState cMenuEditTemplate::ProcessKey(eKeys Key)
ERROR(tr("*** Invalid Channel ***"));
break;
}
- ch = Channels.GetByNumber(channelMax);
+ ch = vdrchannels->GetByNumber(channelMax);
if (ch)
data.channelMax = ch;
else