summaryrefslogtreecommitdiffstats
path: root/src/server/DuplexPort.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/DuplexPort.cpp')
-rw-r--r--src/server/DuplexPort.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp
index 349eb779..f4bf6915 100644
--- a/src/server/DuplexPort.cpp
+++ b/src/server/DuplexPort.cpp
@@ -48,6 +48,13 @@ DuplexPort::DuplexPort(BufferFactory& bufs,
bufs.forge().make(polyphonic));
}
+DuplexPort::~DuplexPort()
+{
+ if (is_linked()) {
+ parent_patch()->remove_port(*this);
+ }
+}
+
bool
DuplexPort::get_buffers(BufferFactory& bufs,
Raul::Array<BufferRef>* buffers,