Check that a route has a track before trying to insert time on it.
authorColin Fletcher <colin.m.fletcher@googlemail.com>
Thu, 10 Sep 2015 10:50:20 +0000 (11:50 +0100)
committerColin Fletcher <colin.m.fletcher@googlemail.com>
Thu, 10 Sep 2015 10:50:20 +0000 (11:50 +0100)
Routes which are busses don't have a track, and thus no playlists either:
avoid a crash when inserting time when a bus is selected and 'all
playlists' is chosen.

gtk2_ardour/editor_ops.cc

index f0940fe719b59887d52d04312f05b7f0c39c9509..2501b651fe42927d02f250b29482e2c33cee9114 100644 (file)
@@ -7285,7 +7285,7 @@ Editor::insert_time (
 
                if (all_playlists) {
                        RouteTimeAxisView* rtav = dynamic_cast<RouteTimeAxisView*> (*x);
-                       if (rtav) {
+                       if (rtav && rtav->track ()) {
                                vector<boost::shared_ptr<Playlist> > all = _session->playlists->playlists_for_track (rtav->track ());
                                for (vector<boost::shared_ptr<Playlist> >::iterator p = all.begin(); p != all.end(); ++p) {
                                        pl.insert (*p);