summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-09-21 16:35:55 +0000
committerDavid Robillard <d@drobilla.net>2008-09-21 16:35:55 +0000
commit073a94350bced3f0f5ec470340a0f02fec137f3b (patch)
tree5321815b068644c4c974e77e5d4be4b14829cb45 /gtk2_ardour
parente14187aadd574d46c82d8eb0d151b526b84ddcc7 (diff)
Fix crash on dragging a region with a visible automation region that has no line.
git-svn-id: svn://localhost/ardour2/branches/3.0@3780 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/automation_region_view.cc6
-rw-r--r--gtk2_ardour/automation_streamview.cc3
2 files changed, 2 insertions, 7 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index b581cb9a9d..c213b3feeb 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -116,12 +116,6 @@ AutomationRegionView::add_automation_event (GdkEvent* event, nframes_t when, dou
_line->the_list()->add (when, y);
- boost::shared_ptr<ARDOUR::MidiRegion> mr = boost::dynamic_pointer_cast<ARDOUR::MidiRegion>(_region);
- if (mr) {
- cout << "ADD TO LIST: " << _line->the_list().get() << " ON " << _region
- << " (model " << mr->midi_source(0)->model() << ")" << endl;
- }
-
XMLNode& after = _line->the_list()->get_state();
view->session().commit_reversible_command (new MementoCommand<ARDOUR::AutomationList>(
*_line->the_list(), &before, &after));
diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc
index 024d235c7d..d3419e8bb8 100644
--- a/gtk2_ardour/automation_streamview.cc
+++ b/gtk2_ardour/automation_streamview.cc
@@ -102,7 +102,8 @@ AutomationStreamView::add_region_view_internal (boost::shared_ptr<Region> region
/* great. we already have an AutomationRegionView for this Region. use it again. */
AutomationRegionView* arv = dynamic_cast<AutomationRegionView*>(*i);;
- arv->line()->set_list (list);
+ if (arv->line())
+ arv->line()->set_list (list);
(*i)->set_valid (true);
(*i)->enable_display(wfd);
display_region(arv);