From a0d02beed5e27a1b0085b0ff1a25dae228fcab06 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 8 Jan 2007 02:52:26 +0000 Subject: 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 --- src/libs/client/PatchModel.cpp | 12 ++++++------ 1 file 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 nm) // Remove any connections which referred to this node, // since they can't possibly exist anymore - for (list >::iterator i = m_connections.begin(); - i != m_connections.end() ; ) { - list >::iterator next = i; + for (list >::iterator j = m_connections.begin(); + j != m_connections.end() ; ) { + list >::iterator next = j; ++next; - SharedPtr cm = (*i); + SharedPtr 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 -- cgit v1.2.1