From 4f6a07c90866825ac15e146c459034006bf9338c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 30 Jun 2012 20:34:53 +0000 Subject: Fix occasional crashes after node deletion (fix #843). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4506 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PatchCanvas.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 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); } -- cgit v1.2.1