summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-23 23:51:44 +0000
committerDavid Robillard <d@drobilla.net>2011-09-23 23:51:44 +0000
commit4cc5c82a87cf2316f425a9ea1de0fb29d0c24c8e (patch)
treed2b874fb8e7437cf7ea819fa6faca36e1c3ddc9d /src/server/events
parent41f1be0a68676f33dc1d7dfbb32c5d6440ebd4c9 (diff)
downloadingen-4cc5c82a87cf2316f425a9ea1de0fb29d0c24c8e.tar.gz
ingen-4cc5c82a87cf2316f425a9ea1de0fb29d0c24c8e.tar.bz2
ingen-4cc5c82a87cf2316f425a9ea1de0fb29d0c24c8e.zip
Fix memory leaks and errors.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3482 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/DisconnectAll.cpp5
1 files changed, 4 insertions, 1 deletions
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())