summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Friedrichs <johann.friedrichs@web.de>2019-01-16 19:38:34 (GMT)
committerJohann Friedrichs <johann.friedrichs@web.de>2019-01-16 19:38:34 (GMT)
commit49ba796fe6298abf0ebba68a25ddfc92d3d70aad (patch)
tree7cd82d93ea4c5304c8f854f8c73a43118b9d8b51
parent84b59b81137887a48533cc897551bccf2e9e10f6 (diff)
downloadvdr-plugin-epgsearch-49ba796fe6298abf0ebba68a25ddfc92d3d70aad.tar.gz
vdr-plugin-epgsearch-49ba796fe6298abf0ebba68a25ddfc92d3d70aad.tar.bz2
avoid erase of iterator inside of a loop
-rw-r--r--conflictcheck.c4
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;