tempo map: fix a potential bug (not seen in the wild) when generating the grid
the "p" variable could point to _points.end(), so we cannot indirect and use p->sclock() value unconditionally.
This commit is contained in:
parent
1ba2e28d6f
commit
a417cbae4b
@ -1926,7 +1926,15 @@ TempoMap::get_grid (TempoMapPoints& ret, superclock_t start, superclock_t end, u
|
||||
|
||||
DEBUG_TRACE (DEBUG::Grid, string_compose ("start %1 end %2 bbt %3 find first/limit with limit @ = %4\n", start, end, bbt, *p));
|
||||
|
||||
while (start < p->sclock() && start < end) {
|
||||
superclock_t limit;
|
||||
|
||||
if (p == _points.end()) {
|
||||
limit = end;
|
||||
} else {
|
||||
limit = std::min (p->sclock(), end);
|
||||
}
|
||||
|
||||
while (start < limit) {
|
||||
|
||||
/* add point to grid, perhaps */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user