Changes for locking in cChannelColumn::SetTimers()

This commit is contained in:
kamel5 2018-05-04 11:36:06 +02:00 committed by kamel5
parent b054fa2c12
commit b086cf85dc
2 changed files with 5 additions and 1 deletions

View File

@ -386,11 +386,13 @@ void cChannelColumn::SetTimers() {
#if VDRVERSNUM >= 20301
hasTimer = false;
const cSchedule *Schedule = NULL;
{
LOCK_SCHEDULES_READ;
const cSchedules* schedules = Schedules;
if (schedules) {
Schedule = schedules->GetSchedule(channel);
hasTimer = Schedule ? Schedule->HasTimer() : false;
}
}
#else
hasTimer = channel->HasTimer();

View File

@ -155,9 +155,11 @@ void cEpgGrid::drawText() {
drawIcon("Switch", theme.Color(clrButtonYellow));
if (hasTimer) {
const cTimer *timer = NULL;
{
LOCK_TIMERS_READ;
timer = Timers->GetMatch(event);
if (timer)
}
if (timer)
#ifdef USE_SWITCHONLY
if (timer->HasFlags(tfSwitchOnly))
drawIcon("Switch", theme.Color(clrButtonYellow));