summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchCanvas.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/PatchCanvas.cpp')
-rw-r--r--src/gui/PatchCanvas.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 9c2abd5c..0857682a 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -419,6 +419,10 @@ PatchCanvas::remove_node(SharedPtr<const NodeModel> nm)
Views::iterator i = _views.find(nm);
if (i != _views.end()) {
+ const guint n_ports = i->second->num_ports();
+ for (gint p = n_ports - 1; p >= 0; --p) {
+ delete i->second->get_port(p);
+ }
delete i->second;
_views.erase(i);
}