Fix crash when group becomes empty but has a subgroup

Session::route_removed_from_route_group() did not delete
the group when it had a subgroup associated with it.
This way it was possible to have an empty track-group that
resulted in various edge-case crashes/assert().
This commit is contained in:
Robin Gareus 2025-12-17 18:31:02 +01:00
parent 370c596322
commit 635916bf7a
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -283,6 +283,7 @@ RouteGroup::remove (std::shared_ptr<Route> r)
}
routes->erase (i);
if (routes->empty()) {
_subgroup_bus.reset ();
group_master.reset ();
_group_master_number = -1;
}