Commit 419e47c2 authored by Michael Ott's avatar Michael Ott
Browse files

One more try at fixing the segfaults due to erased iterators

parent 96a3096c
......@@ -399,6 +399,8 @@ void DCDBQuery::execute() {
auto q = queries.begin();
while (q != queries.end()) {
if (q->first.name != prevSensorName) {
prevSensorName = q->first.name;
// Find all queries for the same sensor
std::pair<queryMap_t::iterator, queryMap_t::iterator> range = queries.equal_range(q->first);
......@@ -444,9 +446,6 @@ void DCDBQuery::execute() {
genOutput(results, range.first, range.second);
results.clear();
}
prevSensorName = q->first.name;
}
if (q != queries.end()) {
q++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment