diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-23 20:14:07 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-23 20:14:07 +0000 |
commit | f4401c59284258c6aa56707da64e3da32756329f (patch) | |
tree | 73679199ae43516347d607adad212c10612f7eb9 /libs/ardour/midi_playlist.cc | |
parent | cac03dbeb6ebdcd406385dd14a746cb8c51dd5f8 (diff) |
midway snapshot of work done on managing Region & Source lifetimes correctly. may fix missing MIDI file bug ; save empty playlists because they may be referred to by the history file ; undo commands auto-delete when objects they refer to die (currently not commands built from XML deserialization); Sources now know how many regions are using them for something, meaning that we know if we can delete the files holding any data for the source
git-svn-id: svn://localhost/ardour2/branches/3.0@7291 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_playlist.cc')
-rw-r--r-- | libs/ardour/midi_playlist.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc index 152735de85..6f5dee979a 100644 --- a/libs/ardour/midi_playlist.cc +++ b/libs/ardour/midi_playlist.cc @@ -359,15 +359,13 @@ bool MidiPlaylist::destroy_region (boost::shared_ptr<Region> region) { boost::shared_ptr<MidiRegion> r = boost::dynamic_pointer_cast<MidiRegion> (region); - bool changed = false; - if (r == 0) { - PBD::fatal << _("programming error: non-midi Region passed to remove_overlap in midi playlist") - << endmsg; - /*NOTREACHED*/ + if (!r) { return false; } + bool changed = false; + { RegionLock rlock (this); RegionList::iterator i; |