diff options
author | Hans Baier <hansfbaier@googlemail.com> | 2008-05-06 22:54:06 +0000 |
---|---|---|
committer | Hans Baier <hansfbaier@googlemail.com> | 2008-05-06 22:54:06 +0000 |
commit | a42913736ab4bd1743d7c29feaaa431094ccb4c9 (patch) | |
tree | 1ca8e4b859b0f6f48cf682c908a1029ce89800b2 /libs/ardour/midi_model.cc | |
parent | c415c44b9c88d12123b0d493c1f71317efbb34e0 (diff) |
* fixed crash bug in MidiModel::const_iterator::operator=: copied iterator from other which becomes invalid because
the container the iterator points into is destroyed
* fixed conditional jump from uninitialised value in CanvasNote
git-svn-id: svn://localhost/ardour2/branches/3.0@3326 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r-- | libs/ardour/midi_model.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index 4990ede978..f17324e8c6 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -260,7 +260,8 @@ MidiModel::const_iterator& MidiModel::const_iterator::operator=(const const_iter _locked = other._locked; _note_iter = other._note_iter; _control_iters = other._control_iters; - _control_iter = other._control_iter; + size_t index = other._control_iter - other._control_iters.begin(); + _control_iter = _control_iters.begin() + index; assert( ! _event.owns_buffer()); |