diff options
author | Robin Gareus <robin@gareus.org> | 2018-09-16 23:08:41 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-09-16 23:08:41 +0200 |
commit | 32986539552bde1b1b66ff30bb070e4bb0fb087f (patch) | |
tree | ddfeb8da4b2cb4e4a7b02e3607536af2989ac1fd /gtk2_ardour/route_group_menu.h | |
parent | 9321f46c453b3df226f0abc8ced6415e1d3e842d (diff) |
Fix crash when re-assigning groups
This works around an issue where gtk sends two callbacks when a radio
selection changes. First: unselect, then select new item.
Previously:
Two tracks, two groups. Select all tracks, assign to 2nd group. Crash.
The first callback, "unselect" iterates over all tracks, removes them
from any groups. Eventually all groups are unused and hence destroyed.
The 2nd callback - "select" - now uses a just destroyed group.
Diffstat (limited to 'gtk2_ardour/route_group_menu.h')
-rw-r--r-- | gtk2_ardour/route_group_menu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk2_ardour/route_group_menu.h b/gtk2_ardour/route_group_menu.h index 334a3b504e..b29114a145 100644 --- a/gtk2_ardour/route_group_menu.h +++ b/gtk2_ardour/route_group_menu.h @@ -38,7 +38,7 @@ public: private: void add_item (ARDOUR::RouteGroup *, std::set<ARDOUR::RouteGroup*> const &, Gtk::RadioMenuItem::Group*); void new_group (); - void set_group (ARDOUR::RouteGroup *); + void set_group (Gtk::RadioMenuItem*, ARDOUR::RouteGroup *); void new_group_dialog_finished (int, RouteGroupDialog*); Gtk::Menu* _menu; |