From fb254fb2fc89f89142a2c991d9b09364ca1dac02 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Feb 2009 04:53:01 +0000 Subject: [PATCH] Fix crash when NullAutomation is created (which shouldn't be happening, but hey...). git-svn-id: svn://localhost/ardour2/branches/3.0@4598 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/audio_time_axis.cc | 4 +--- gtk2_ardour/midi_time_axis.cc | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 1d66dda0b0..16a9ef6b2f 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -387,9 +387,7 @@ AudioTimeAxisView::ensure_pan_views (bool show) *this, false, parent_canvas, - name) - - ); + name)); add_automation_child (*p, pan_track, show); } diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 7d78ae4365..2c852fb211 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -494,6 +494,11 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool /* These controllers are region "automation", so we do not create * an AutomationList/Line for the track */ + if (param.type() == NullAutomation) { + cerr << "WARNING: Attempt to create NullAutomation child, ignoring" << endl; + return; + } + AutomationTracks::iterator existing = _automation_tracks.find(param); if (existing != _automation_tracks.end()) return;