mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Eliminate a seqfault in cRecManager::DeleteSearchTimer
This commit is contained in:
parent
060089548a
commit
dfb2c2b031
32
recmanager.c
32
recmanager.c
@ -543,45 +543,33 @@ void cRecManager::DeleteSearchTimer(cTVGuideSearchTimer *searchTimer, bool delTi
|
|||||||
return;
|
return;
|
||||||
int searchTimerID = searchTimer->GetID();
|
int searchTimerID = searchTimer->GetID();
|
||||||
if (delTimers) {
|
if (delTimers) {
|
||||||
|
cTimers* timers;
|
||||||
#if VDRVERSNUM >= 20301
|
#if VDRVERSNUM >= 20301
|
||||||
|
{
|
||||||
LOCK_TIMERS_WRITE;
|
LOCK_TIMERS_WRITE;
|
||||||
cTimer *timer = Timers->First();
|
timers = Timers;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
cTimer *timer = Timers.First();
|
timers = &Timers;
|
||||||
#endif
|
#endif
|
||||||
|
cTimer *timer = timers->First();
|
||||||
while(timer) {
|
while(timer) {
|
||||||
if (!timer->Recording()) {
|
if (!timer->Recording()) {
|
||||||
char* searchID = GetAuxValue(timer, "s-id");
|
char* searchID = GetAuxValue(timer, "s-id");
|
||||||
if (searchID) {
|
if (searchID) {
|
||||||
if (searchTimerID == atoi(searchID)) {
|
if (searchTimerID == atoi(searchID)) {
|
||||||
#if VDRVERSNUM >= 20301
|
cTimer* timerNext = timers->Next(timer);
|
||||||
cTimer* timerNext = Timers->Next(timer);
|
|
||||||
#else
|
|
||||||
cTimer* timerNext = Timers.Next(timer);
|
|
||||||
#endif
|
|
||||||
DeleteTimer(timer);
|
DeleteTimer(timer);
|
||||||
timer = timerNext;
|
timer = timerNext;
|
||||||
} else {
|
} else {
|
||||||
#if VDRVERSNUM >= 20301
|
timer = timers->Next(timer);
|
||||||
timer = Timers->Next(timer);
|
|
||||||
#else
|
|
||||||
timer = Timers.Next(timer);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
free(searchID);
|
free(searchID);
|
||||||
} else {
|
} else {
|
||||||
#if VDRVERSNUM >= 20301
|
timer = timers->Next(timer);
|
||||||
timer = Timers->Next(timer);
|
|
||||||
#else
|
|
||||||
timer = Timers.Next(timer);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#if VDRVERSNUM >= 20301
|
timer = timers->Next(timer);
|
||||||
timer = Timers->Next(timer);
|
|
||||||
#else
|
|
||||||
timer = Timers.Next(timer);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user