summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-08 02:52:26 +0000
committerDavid Robillard <d@drobilla.net>2007-01-08 02:52:26 +0000
commita0d02beed5e27a1b0085b0ff1a25dae228fcab06 (patch)
treed409a963028640f39fcd6f1b96c0edb7087675d6
parentc5218b13bac00fbd8c3ceb99b46063b98bc1fdd3 (diff)
downloadingen-a0d02beed5e27a1b0085b0ff1a25dae228fcab06.tar.gz
ingen-a0d02beed5e27a1b0085b0ff1a25dae228fcab06.tar.bz2
ingen-a0d02beed5e27a1b0085b0ff1a25dae228fcab06.zip
Fix lingering connections after node destruction (if disconnection
events aren't recieved first). git-svn-id: http://svn.drobilla.net/lad/ingen@242 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/libs/client/PatchModel.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp
index 1148ff61..61dbe0a0 100644
--- a/src/libs/client/PatchModel.cpp
+++ b/src/libs/client/PatchModel.cpp
@@ -127,18 +127,18 @@ PatchModel::remove_node(SharedPtr<NodeModel> nm)
// Remove any connections which referred to this node,
// since they can't possibly exist anymore
- for (list<SharedPtr<ConnectionModel> >::iterator i = m_connections.begin();
- i != m_connections.end() ; ) {
- list<SharedPtr<ConnectionModel> >::iterator next = i;
+ for (list<SharedPtr<ConnectionModel> >::iterator j = m_connections.begin();
+ j != m_connections.end() ; ) {
+ list<SharedPtr<ConnectionModel> >::iterator next = j;
++next;
- SharedPtr<ConnectionModel> cm = (*i);
+ SharedPtr<ConnectionModel> cm = (*j);
if (cm->src_port_path().parent() == nm->path()
|| cm->dst_port_path().parent() == nm->path()) {
- m_connections.erase(i); // cuts our reference
+ m_connections.erase(j); // cuts our reference
assert(!get_connection(cm->src_port_path(), cm->dst_port_path())); // no duplicates
removed_connection_sig.emit(cm->src_port_path(), cm->dst_port_path());
}
- i = next;
+ j = next;
}
// Remove the Node itself