From 68c2d72ba4e2208ff926461bb6faccfbadcf2a61 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 14 Aug 2012 22:48:58 +0000 Subject: Don't look up system ports by path in the audio thread. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4697 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/events/Delete.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/server/events/Delete.cpp') 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) { -- cgit v1.2.1