From 4cc5c82a87cf2316f425a9ea1de0fb29d0c24c8e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 23 Sep 2011 23:51:44 +0000 Subject: Fix memory leaks and errors. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3482 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/events/DisconnectAll.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/server/events') diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index dd694810..23db5167 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -129,8 +129,11 @@ DisconnectAll::pre_process() } for (Patch::Connections::const_iterator i = _parent->connections().begin(); - i != _parent->connections().end(); ++i) { + i != _parent->connections().end();) { + Patch::Connections::const_iterator next = i; + ++next; maybe_remove_connection((ConnectionImpl*)i->second.get()); + i = next; } if (!_deleting && _parent->enabled()) -- cgit v1.2.1