diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-24 00:05:28 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-24 00:05:28 +0000 |
commit | ea4db5c1dd95e688cc77a0e030a1039769c01c36 (patch) | |
tree | ec52cd0316100f4bca582b469b73e83b6230c994 /gtk2_ardour/route_time_axis.cc | |
parent | 17a2d70f1c9108ee39bd2e9d0450a636500e08a5 (diff) |
Fix crash on opening route menu with busses in the selection.
git-svn-id: svn://localhost/ardour2/branches/3.0@8945 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 94b85f7876..1730725fe7 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -524,7 +524,7 @@ RouteTimeAxisView::build_display_menu () TrackSelection const & s = _editor.get_selection().tracks; for (TrackSelection::const_iterator i = s.begin(); i != s.end(); ++i) { RouteTimeAxisView* r = dynamic_cast<RouteTimeAxisView*> (*i); - if (!r) { + if (!r || !r->is_track ()) { continue; } @@ -961,7 +961,9 @@ RouteTimeAxisView::set_align_style (AlignStyle style, bool apply_to_selection) if (apply_to_selection) { _editor.get_selection().tracks.foreach_route_time_axis (boost::bind (&RouteTimeAxisView::set_align_style, _1, style, false)); } else { - track()->set_align_style (style); + if (track ()) { + track()->set_align_style (style); + } } } |