From 699307400daf8a32be2b88c2b6875a0cc03adb84 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 6 Jan 2011 01:05:26 +0000 Subject: [PATCH] Fix crash on selecting no route group in a mixer strip. git-svn-id: svn://localhost/ardour2/branches/3.0@8456 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/mixer_strip.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index eb0569d55f..8f2deb8539 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -1329,10 +1329,17 @@ MixerStrip::comment_changed (void *src) } } +/** Set the route group for this strip's route, or remove it from its current group. + * @param rg New RouteGroup, or 0. + */ void MixerStrip::set_route_group (RouteGroup *rg) { - rg->add (_route); + if (rg) { + rg->add (_route); + } else if (_route->route_group ()) { + _route->route_group()->remove (_route); + } } bool