summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2015-09-10 11:50:20 +0100
committerColin Fletcher <colin.m.fletcher@googlemail.com>2015-09-10 11:50:20 +0100
commit3eb7ee6ac1a31338bc45eaf5af765f41f34ad910 (patch)
tree88952ea172767a3b6ea81802abac6c998f02ad4f
parent1a6c08dcfc07b7254dd2ac4470a363a1a0f94461 (diff)
Check that a route has a track before trying to insert time on it.
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.
-rw-r--r--gtk2_ardour/editor_ops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index f0940fe719..2501b651fe 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -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);