prepare for the day when there can be TimeAxisView's that are not RouteTimeAxisViews.
authorRobin Gareus <robin@gareus.org>
Sun, 23 Mar 2014 02:11:08 +0000 (03:11 +0100)
committerRobin Gareus <robin@gareus.org>
Sun, 23 Mar 2014 02:11:08 +0000 (03:11 +0100)
gtk2_ardour/editor_ops.cc

index abc90d2f5920de67dafdf52d30932389f08d82c8..f764af3671c9c2b110db6b7545fd90413bf6063f 100644 (file)
@@ -6495,12 +6495,13 @@ Editor::remove_tracks ()
 
        for (TrackSelection::iterator x = ts.begin(); x != ts.end(); ++x) {
                RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*> (*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);