diff options
-rw-r--r-- | recmanager.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/recmanager.c b/recmanager.c index d9912be..7b03630 100644 --- a/recmanager.c +++ b/recmanager.c @@ -168,10 +168,13 @@ void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string p void cRecManager::DeleteTimer(int timerID) { #if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + const cTimer *t; + { LOCK_TIMERS_READ; - const cTimer *t = Timers->Get(timerID); + t = Timers->Get(timerID); + } #else - const cTimer *t = Timers.Get(timerID); + t = Timers.Get(timerID); #endif if (!t) @@ -191,10 +194,13 @@ void cRecManager::DeleteTimer(const cEvent *event) { void cRecManager::DeleteLocalTimer(const cEvent *event) { #if defined (APIVERSNUM) && (APIVERSNUM >= 20301) + const cTimer *t; + { LOCK_TIMERS_READ; - const cTimer *t = Timers->GetMatch(event); + t = Timers->GetMatch(event); + } #else - const cTimer *t = Timers.GetMatch(event); + t = Timers.GetMatch(event); #endif if (!t) |