diff options
Diffstat (limited to 'searchtimer.c')
-rw-r--r-- | searchtimer.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/searchtimer.c b/searchtimer.c index 22d1313..6d748e5 100644 --- a/searchtimer.c +++ b/searchtimer.c @@ -17,9 +17,11 @@ cTVGuideSearchTimer::cTVGuideSearchTimer(void) { stopTime = 2359; useChannel = false; #if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + { LOCK_CHANNELS_READ; channelMin = Channels->GetByNumber(cDevice::CurrentChannel()); channelMax = Channels->GetByNumber(cDevice::CurrentChannel()); + } #else channelMin = Channels.GetByNumber(cDevice::CurrentChannel()); channelMax = Channels.GetByNumber(cDevice::CurrentChannel()); @@ -247,11 +249,11 @@ bool cTVGuideSearchTimer::Parse(bool readTemplate) { int channels = sscanf(values[value].c_str(), "%m[^|]|%m[^|]", &channelMinbuffer, &channelMaxbuffer); #if defined (APIVERSNUM) && (APIVERSNUM >= 20301) LOCK_CHANNELS_READ; - const cChannels* channelsP = Channels; + const cChannels* channelsP = Channels; #else cChannels* channelsP = &Channels; #endif - channelMin = channelsP->GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true); + channelMin = channelsP->GetByChannelID(tChannelID::FromString(channelMinbuffer), true, true); if (!channelMin) { channelMin = channelMax = NULL; useChannel = 0; |