summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/PatchModel.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/PatchModel.cpp b/src/client/PatchModel.cpp
index cec8b13b..25255f06 100644
--- a/src/client/PatchModel.cpp
+++ b/src/client/PatchModel.cpp
@@ -52,14 +52,9 @@ PatchModel::remove_child(SharedPtr<ObjectModel> o)
assert(o->path().is_child_of(_path));
assert(o->parent().get() == this);
- SharedPtr<PortModel> pm = PtrCast<PortModel>(o);
- if (pm)
- remove_port(pm);
-
// Remove any connections which referred to this object,
// since they can't possibly exist anymore
- for (Connections::iterator j = _connections->begin(); j != _connections->end() ; ) {
-
+ for (Connections::iterator j = _connections->begin(); j != _connections->end(); ) {
Connections::iterator next = j;
++next;
@@ -77,6 +72,10 @@ PatchModel::remove_child(SharedPtr<ObjectModel> o)
j = next;
}
+ SharedPtr<PortModel> pm = PtrCast<PortModel>(o);
+ if (pm)
+ remove_port(pm);
+
SharedPtr<NodeModel> nm = PtrCast<NodeModel>(o);
if (nm)
signal_removed_node.emit(nm);