Don't modify a RouteUISelection that we've just erased
authorJohn Emmas <johne53@tiscali.co.uk>
Fri, 17 Apr 2015 15:12:48 +0000 (16:12 +0100)
committerJohn Emmas <johne53@tiscali.co.uk>
Fri, 17 Apr 2015 15:13:40 +0000 (16:13 +0100)
gtk2_ardour/route_processor_selection.cc

index e66eaf959e868f9d01d3654eb5af4007ab58a11d..8975bf90bcd13fdb953570d0051ca61f83dbd94c 100644 (file)
@@ -124,8 +124,8 @@ RouteProcessorSelection::remove (RouteUI* r)
 
        RouteUISelection::iterator i;
        if ((i = find (routes.begin(), routes.end(), r)) != routes.end()) {
-               routes.erase (i);
                (*i)->set_selected (false);
+               routes.erase (i);
                if (!_no_route_change_signal) {
                        RoutesChanged ();
                }