summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Delete.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp
index 96668af1..97f1161f 100644
--- a/src/server/events/Delete.cpp
+++ b/src/server/events/Delete.cpp
@@ -109,6 +109,10 @@ Delete::pre_process()
_ports_array = _port->parent_patch()->build_ports_array();
assert(_ports_array->size() == _port->parent_patch()->num_ports_non_rt());
}
+
+ if (!_port->parent_patch()->parent()) {
+ _engine_port = _engine.driver()->port(_port->path());
+ }
}
}
@@ -140,8 +144,9 @@ Delete::execute(ProcessContext& context)
_engine.maid()->push(_port->parent_patch()->external_ports());
_port->parent_patch()->external_ports(_ports_array);
- if ( ! _port->parent_patch()->parent())
- _garbage = _engine.driver()->remove_port(context, _port->path(), &_engine_port);
+ if (_engine_port) {
+ _garbage = _engine.driver()->remove_port(context, _engine_port);
+ }
}
if (parent_patch) {