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.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 8a580b88..0360d989 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -395,11 +395,11 @@ PatchCanvas::remove_port(SharedPtr<PortModel> pm)
// Port on this patch
if (i != _views.end()) {
- _views.erase(i);
bool ret = remove_item(i->second);
if (!ret)
cerr << "WARNING: Failed to remove port item: " << pm->path() << endl;
i->second.reset();
+ _views.erase(i);
} else {
SharedPtr<NodeModule> module = PtrCast<NodeModule>(_views[pm->parent()]);