13
0

MidiRegion: take reader lock before cloning data into new source

This commit is contained in:
Paul Davis 2022-03-30 13:01:10 -06:00
parent 718b3fcfa9
commit bbfb1bd229

View File

@ -149,6 +149,7 @@ MidiRegion::clone (boost::shared_ptr<MidiSource> newsrc, ThawList* tl) const
take a lock on newsrc. take a lock on newsrc.
*/ */
Source::ReaderLock lm (ms->mutex());
if (ms->write_to (lm, newsrc, bbegin, bend)) { if (ms->write_to (lm, newsrc, bbegin, bend)) {
return boost::shared_ptr<MidiRegion> (); return boost::shared_ptr<MidiRegion> ();
} }