summaryrefslogtreecommitdiff
path: root/epgclone.c
diff options
context:
space:
mode:
Diffstat (limited to 'epgclone.c')
-rw-r--r--epgclone.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/epgclone.c b/epgclone.c
index 46397d1..ac9c179 100644
--- a/epgclone.c
+++ b/epgclone.c
@@ -49,9 +49,16 @@ void cEpgClone::CloneEvent(cEvent *Source, cEvent *Dest) {
Dest->SetSeen();
tChannelID channelID;
if (dest_num) {
+#if VDRVERSNUM >= 20301
+ LOCK_CHANNELS_READ;
+ const cChannel *dest_chan = Channels->GetByNumber(dest_num);
+ if (dest_chan)
+ channelID = Channels->GetByNumber(dest_num)->GetChannelID();
+#else
cChannel *dest_chan = Channels.GetByNumber(dest_num);
if (dest_chan)
channelID = Channels.GetByNumber(dest_num)->GetChannelID();
+#endif
else
channelID = tChannelID::InvalidID;
}