Fix use of invalidated iterator (#4821).

git-svn-id: svn://localhost/ardour2/branches/3.0@11892 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-04-11 10:31:29 +00:00
parent 7ce8ec0d3d
commit b788b7c56c

View File

@ -571,8 +571,9 @@ private:
{
typename std::list<T*>::iterator x = find (_selection.begin(), _selection.end(), child);
if (x != _selection.end()) {
T* c = *x;
_selection.erase (x);
setup_child_state (*x);
setup_child_state (c);
}
}