mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
Fix crash on iteration over an empty sequence and/or recording controllers only.
git-svn-id: svn://localhost/ardour2/branches/3.0@4596 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
93d7040d04
commit
0ef53a2d34
1 changed files with 3 additions and 5 deletions
|
|
@ -186,10 +186,10 @@ Sequence<Time>::const_iterator::const_iterator(const Sequence<Time>& seq, Time t
|
|||
seq.control_to_midi_event(_event, earliest_control);
|
||||
break;
|
||||
default:
|
||||
assert(false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!_event || _event->size() == 0) {
|
||||
if (_type == NIL || !_event || _event->size() == 0) {
|
||||
DUMP(format("Starting at end @ %1%\n") % t);
|
||||
_type = NIL;
|
||||
_is_end = true;
|
||||
|
|
@ -200,10 +200,8 @@ Sequence<Time>::const_iterator::const_iterator(const Sequence<Time>& seq, Time t
|
|||
% (int)_event->event_type()
|
||||
% (int)((MIDIEvent<Time>*)_event.get())->type()
|
||||
% _event->time());
|
||||
assert(midi_event_is_valid(_event->buffer(), _event->size()));
|
||||
}
|
||||
|
||||
assert(_event && _event->size() > 0 && _event->time() >= t);
|
||||
assert(midi_event_is_valid(_event->buffer(), _event->size()));
|
||||
}
|
||||
|
||||
template<typename Time>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue