diff options
author | David Robillard <d@drobilla.net> | 2013-01-19 07:00:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-01-19 07:00:43 +0000 |
commit | fc77ae0738565770abde1a25f650a035cf082af0 (patch) | |
tree | f4edb7bcdcddf186fcf5cf4fb033e602580e4008 /gtk2_ardour/automation_time_axis.cc | |
parent | d251c68d7676a18ab9ed935e22558e2b18981b41 (diff) |
Replace a bunch of potential crashes with graceful handling of the situation.
We really need some kind of more sophisticated assert macro that can be
switched to non-fatal logging mode for release builds. A log message, which is
often all that would happen, is a lot better than a trainwrecked performance...
git-svn-id: svn://localhost/ardour2/branches/3.0@13892 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 8b090cf001..9fa412652d 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -192,8 +192,9 @@ AutomationTimeAxisView::AutomationTimeAxisView ( /* ask for notifications of any new RegionViews */ if (show_regions) { - assert(_view); - _view->attach (); + if (_view) { + _view->attach (); + } } else { /* no regions, just a single line for the entire track (e.g. bus gain) */ @@ -706,9 +707,7 @@ AutomationTimeAxisView::clear_lines () void AutomationTimeAxisView::add_line (boost::shared_ptr<AutomationLine> line) { - assert(line); - assert(!_line); - if (_control) { + if (_control && line) { assert(line->the_list() == _control->list()); _control->alist()->automation_state_changed.connect ( |