13
0

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
This commit is contained in:
Carl Hetherington 2010-06-20 01:33:16 +00:00
parent aef9d4eaeb
commit 6c19e1c7ea
2 changed files with 7 additions and 5 deletions

View File

@ -140,7 +140,7 @@ public:
PBD::Signal0<void> ContentsChanged;
const MidiSource* midi_source() const { return _midi_source; }
void set_midi_source(MidiSource* source) { _midi_source = source; }
void set_midi_source (MidiSource *);
boost::shared_ptr<Evoral::Note<TimeType> > find_note (NotePtr);

View File

@ -1125,7 +1125,9 @@ MidiModel::insert_merge_policy () const
}
}
void
MidiModel::set_midi_source (MidiSource* s)
{
_midi_source->invalidate ();
_midi_source = s;
}