summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-05 11:25:47 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-05 13:04:42 +0200
commit0f0d7ca07f7b23c0719c17288fb53003b573c426 (patch)
treed5c63e31a1955f8680deff513d0f9f147a375ac2
parent3596d0353b498234c4ec1515106b13e51b758668 (diff)
downloadvdr-plugin-tvguideng-0f0d7ca07f7b23c0719c17288fb53003b573c426.tar.gz
vdr-plugin-tvguideng-0f0d7ca07f7b23c0719c17288fb53003b573c426.tar.bz2
Fixed invalid lock sequence in tvguidengosd.c
-rw-r--r--tvguidengosd.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/tvguidengosd.c b/tvguidengosd.c
index bdb7f36..2f635bf 100644
--- a/tvguidengosd.c
+++ b/tvguidengosd.c
@@ -53,11 +53,14 @@ void cTVGuideOSD::Show(void) {
timeManager->Now();
epgGrid = new cEpgGrid(rootView, timeManager);
+ const cChannel *startChannel;
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
+ {
LOCK_CHANNELS_READ;
- const cChannel *startChannel = Channels->GetByNumber(cDevice::CurrentChannel());
+ startChannel = Channels->GetByNumber(cDevice::CurrentChannel());
+ }
#else
- const cChannel *startChannel = Channels.GetByNumber(cDevice::CurrentChannel());
+ startChannel = Channels.GetByNumber(cDevice::CurrentChannel());
#endif
epgGrid->Init(startChannel);
epgGrid->Activate();
@@ -342,11 +345,14 @@ void cTVGuideOSD::CheckTimeout(void) {
int newChannelNum = channelJumper->GetChannel();
delete channelJumper;
channelJumper = NULL;
+ const cChannels* channels;
#if defined (APIVERSNUM) && (APIVERSNUM >= 20301)
- LOCK_CHANNELS_READ;
- const cChannels* channels = Channels;
+ {
+ LOCK_CHANNELS_READ;
+ channels = Channels;
+ }
#else
- cChannels* channels = &Channels;
+ channels = &Channels;
#endif
const cChannel *newChannel = channels->GetByNumber(newChannelNum);
if (!newChannel) {