From ef08c819da00493111147af5d839f67a86b8a820 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 16 Jul 2022 20:26:56 +0200 Subject: [PATCH] Fix crash on port unregistration pr->erase (*i); deletes the iterator, it cannot be safely dereferenced again later. --- libs/ardour/port_engine_shared.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/port_engine_shared.cc b/libs/ardour/port_engine_shared.cc index 0aea69e340..183086dfce 100644 --- a/libs/ardour/port_engine_shared.cc +++ b/libs/ardour/port_engine_shared.cc @@ -457,7 +457,7 @@ PortEngineSharedImpl::unregister_port (PortEngine::PortHandle port_handle) pm->erase (port->name()); ps->erase (i); - pr->erase (*i); + pr->erase (port); } _ports.flush ();