various safety checks for the result of dynamic_cast-ing a TimeAxisView to RouteTimeAxisView

Now that we have VCATimeAxisView, this needed to be done, but it also potentially applied with automation
This commit is contained in:
Paul Davis 2016-06-02 08:42:58 -04:00
parent 3835b782b3
commit 6baac7d46f
6 changed files with 109 additions and 62 deletions

View file

@ -2096,7 +2096,7 @@ Editor::visible_order_range (int* low, int* high) const
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*i);
if (!rtv->hidden()) {
if (rtv && !rtv->hidden()) {
if (*high < rtv->order()) {
*high = rtv->order ();
@ -2309,7 +2309,7 @@ Editor::mouse_brush_insert_region (RegionView* rv, framepos_t pos)
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&rv->get_time_axis_view());
if (rtv == 0 || !rtv->is_track()) {
if (!rtv || !rtv->is_track()) {
return;
}