From ea4db5c1dd95e688cc77a0e030a1039769c01c36 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 24 Feb 2011 00:05:28 +0000 Subject: [PATCH] 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 --- gtk2_ardour/route_time_axis.cc | 6 ++++-- 1 file 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 (*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); + } } }