From 87c777450bae5497b2fcbb3f4d401a426252a87d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 23 Mar 2014 03:11:08 +0100 Subject: [PATCH] prepare for the day when there can be TimeAxisView's that are not RouteTimeAxisViews. --- gtk2_ardour/editor_ops.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index abc90d2f59..f764af3671 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -6495,12 +6495,13 @@ Editor::remove_tracks () for (TrackSelection::iterator x = ts.begin(); x != ts.end(); ++x) { RouteTimeAxisView* rtv = dynamic_cast (*x); - if (rtv) { - if (rtv->is_track()) { - ntracks++; - } else { - nbusses++; - } + if (!rtv) { + continue; + } + if (rtv->is_track()) { + ntracks++; + } else { + nbusses++; } routes.push_back (rtv->_route);