diff options
author | Carl Hetherington <carl@carlh.net> | 2010-06-20 01:33:16 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-06-20 01:33:16 +0000 |
commit | 6c19e1c7eab9804c5b522f0e571abae82ac14c65 (patch) | |
tree | 4c56d4a7034adbb0825a8e3ba324d1a2ce8b5239 /libs/ardour/midi_model.cc | |
parent | aef9d4eaeb71ec58b7d3dbaed5195a6b1ae39655 (diff) |
Invalidate old sources before forgetting about them. I think this prevents the possibility of an old source keeping a lock on the MidiModel via its iterator. May fix #3249.
git-svn-id: svn://localhost/ardour2/branches/3.0@7280 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r-- | libs/ardour/midi_model.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index bdf0516dea..566bf9d9a3 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -1125,7 +1125,9 @@ MidiModel::insert_merge_policy () const } } - - - - +void +MidiModel::set_midi_source (MidiSource* s) +{ + _midi_source->invalidate (); + _midi_source = s; +} |