Check that a route has a track before trying to insert time on it.
[ardour.git] / 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);