Fix crash on "Consolidate Range" on MIDI tracks (#4226).
authorDavid Robillard <d@drobilla.net>
Fri, 7 Oct 2011 21:35:33 +0000 (21:35 +0000)
committerDavid Robillard <d@drobilla.net>
Fri, 7 Oct 2011 21:35:33 +0000 (21:35 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10200 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_ops.cc
libs/ardour/midi_track.cc

index 2e3de226352691b3f9e05307f9e8cb8de0b465bb..8ba2115003d29b0bb8a621dd11651d16bed39de9 100644 (file)
@@ -3368,6 +3368,10 @@ Editor::bounce_range_selection (bool replace, bool enable_processing)
 
                boost::shared_ptr<Region> r = rtv->track()->bounce_range (start, start+cnt, itt, enable_processing);
 
+               if (!r) {
+                       continue;
+               }
+
                if (replace) {
                        list<AudioRange> ranges;
                        ranges.push_back (AudioRange (start, start+cnt, 0));
index f42181b45818c76f0db43115809bdc33b8464d3f..d51e5ef067f05cb582468f0a2ab0f4a2577d515d 100644 (file)
@@ -508,9 +508,7 @@ MidiTrack::export_stuff (BufferSet& /*bufs*/, framecnt_t /*nframes*/, framepos_t
 boost::shared_ptr<Region>
 MidiTrack::bounce (InterThreadInfo& /*itt*/)
 {
-       throw;
-       // vector<MidiSource*> srcs;
-       // return _session.write_one_track (*this, 0, _session.current_end_frame(), false, srcs, itt);
+       std::cerr << "MIDI bounce currently unsupported" << std::endl;
        return boost::shared_ptr<Region> ();
 }
 
@@ -518,15 +516,14 @@ MidiTrack::bounce (InterThreadInfo& /*itt*/)
 boost::shared_ptr<Region>
 MidiTrack::bounce_range (framepos_t /*start*/, framepos_t /*end*/, InterThreadInfo& /*itt*/, bool /*enable_processing*/)
 {
-       throw;
-       //vector<MidiSource*> srcs;
-       //return _session.write_one_track (*this, start, end, false, srcs, itt);
+       std::cerr << "MIDI bounce range currently unsupported" << std::endl;
        return boost::shared_ptr<Region> ();
 }
 
 void
 MidiTrack::freeze_me (InterThreadInfo& /*itt*/)
 {
+       std::cerr << "MIDI freeze currently unsupported" << std::endl;
 }
 
 void