diff options
author | Johann Friedrichs <johann.friedrichs@web.de> | 2019-01-16 20:38:34 +0100 |
---|---|---|
committer | Johann Friedrichs <johann.friedrichs@web.de> | 2019-01-16 20:38:34 +0100 |
commit | 49ba796fe6298abf0ebba68a25ddfc92d3d70aad (patch) | |
tree | 7cd82d93ea4c5304c8f854f8c73a43118b9d8b51 | |
parent | 84b59b81137887a48533cc897551bccf2e9e10f6 (diff) | |
download | vdr-plugin-epgsearch-49ba796fe6298abf0ebba68a25ddfc92d3d70aad.tar.gz vdr-plugin-epgsearch-49ba796fe6298abf0ebba68a25ddfc92d3d70aad.tar.bz2 |
avoid erase of iterator inside of a loop
-rw-r--r-- | conflictcheck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/conflictcheck.c b/conflictcheck.c index 14ab431..d7dda8c 100644 --- a/conflictcheck.c +++ b/conflictcheck.c @@ -587,8 +587,8 @@ int cConflictCheck::ProcessCheckTime(cConflictCheckTime* checkTime) for (it = pendingTimers.begin(); it != pendingTimers.end(); ++it) { if ((*it) && (*it)->stop > checkTime->evaltime) checkTime->startingTimers.insert(*it); - pendingTimers.erase(*it); } + pendingTimers.clear(); LogFile.Log(3, "attach starting timers"); // handle starting timers @@ -603,9 +603,9 @@ int cConflictCheck::ProcessCheckTime(cConflictCheckTime* checkTime) for (; it2 != devices[device].recTimers.end(); ++it2) { 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; |