diff options
author | Carl Hetherington <carl@carlh.net> | 2011-01-06 01:05:26 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-01-06 01:05:26 +0000 |
commit | 699307400daf8a32be2b88c2b6875a0cc03adb84 (patch) | |
tree | e4b83d9882cde254d1cff9bdcb364146a9adae7e /gtk2_ardour | |
parent | 10ead326e430b3e52754e9229679d6cb8b3e5813 (diff) |
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
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 9 |
1 files changed, 8 insertions, 1 deletions
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 |