Fix crash on port unregistration

pr->erase (*i); deletes the iterator, it cannot be safely
dereferenced again later.
This commit is contained in:
Robin Gareus 2022-07-16 20:26:56 +02:00
parent b9419aa405
commit ef08c819da
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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 ();