Fix crash on out of range MIDI events (though this shouldn't be possible at all....).
git-svn-id: svn://localhost/ardour2/branches/3.0@3357 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -101,8 +101,12 @@ MidiModel::const_iterator::const_iterator(const MidiModel& model, double t)
|
||||
}
|
||||
|
||||
assert(x >= 0);
|
||||
assert(y >= i->first.min());
|
||||
assert(y <= i->first.max());
|
||||
|
||||
if (y >= i->first.min() || y <= i->first.max()) {
|
||||
cerr << "ERROR: Event value '" << y << "' out of range ["
|
||||
<< i->first.min() << "," << i->first.max() << "], ignored" << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
const MidiControlIterator new_iter(i->second->list(), x, y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user