diff options
author | David Robillard <d@drobilla.net> | 2012-06-30 20:34:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-06-30 20:34:53 +0000 |
commit | 4f6a07c90866825ac15e146c459034006bf9338c (patch) | |
tree | 132679ef77f19a5b6d80b5f75ad9b6c640716a26 | |
parent | 8f7f419adcfcd6cd7557b82266b064ed242793ad (diff) | |
download | ingen-4f6a07c90866825ac15e146c459034006bf9338c.tar.gz ingen-4f6a07c90866825ac15e146c459034006bf9338c.tar.bz2 ingen-4f6a07c90866825ac15e146c459034006bf9338c.zip |
Fix occasional crashes after node deletion (fix #843).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4506 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/gui/PatchCanvas.cpp | 4 |
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); } |