From fc77ae0738565770abde1a25f650a035cf082af0 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 19 Jan 2013 07:00:43 +0000 Subject: 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 --- gtk2_ardour/automation_time_axis.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gtk2_ardour/automation_time_axis.cc') 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 line) { - assert(line); - assert(!_line); - if (_control) { + if (_control && line) { assert(line->the_list() == _control->list()); _control->alist()->automation_state_changed.connect ( -- cgit v1.2.3