summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Friedrichs <johann.friedrichs@web.de>2019-01-16 20:47:41 +0100
committerJohann Friedrichs <johann.friedrichs@web.de>2019-01-16 20:47:41 +0100
commit253979ed9749b93950907c80e183313bd15c0b94 (patch)
treee48f060b2c64473b15bae7b18759946b47856dad
parentf0edffbe712cbb4fdd5ebd8c80ee8c00663c15eb (diff)
downloadvdr-plugin-epgsearch-vdr-2.2.x.tar.gz
vdr-plugin-epgsearch-vdr-2.2.x.tar.bz2
avoid erase of iterator inside of a loopvdr-2.2.x
-rw-r--r--conflictcheck.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/conflictcheck.c b/conflictcheck.c
index c4552d4..1dffa58 100644
--- a/conflictcheck.c
+++ b/conflictcheck.c
@@ -494,8 +494,8 @@ int cConflictCheck::ProcessCheckTime(cConflictCheckTime* checkTime)
{
if ((*it) && (*it)->stop > checkTime->evaltime)
checkTime->startingTimers.insert(*it);
- pendingTimers.erase(*it);
}
+ pendingTimers.clear();
LogFile.Log(3,"attach starting timers");
// handle starting timers
@@ -514,9 +514,9 @@ int cConflictCheck::ProcessCheckTime(cConflictCheckTime* checkTime)
{
LogFile.Log(3,"stopping timer '%s' (%s, channel %s) at %s on device %d because of higher priority", (*it2)->timer->File(), DAYDATETIME((*it2)->start), CHANNELNAME((*it2)->timer->Channel()), DAYDATETIME(checkTime->evaltime), device+1);
AddConflict((*it2), checkTime, pendingTimers);
- devices[device].recTimers.erase(*it2);
Conflicts++;
}
+ devices[device].recTimers.clear();
}
devices[device].recTimers.insert(*it);
(*it)->device = device;