From 6a8863386a272c4ca37459c586fb34f9ad46cfc0 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 8 Apr 2020 00:28:30 -0600 Subject: [PATCH] use an Unwinder to provde exception-safety --- libs/ardour/port_manager.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/ardour/port_manager.cc b/libs/ardour/port_manager.cc index d98b6a83b6..24148e6a77 100644 --- a/libs/ardour/port_manager.cc +++ b/libs/ardour/port_manager.cc @@ -32,6 +32,7 @@ #include "pbd/error.h" #include "pbd/strsplit.h" +#include "pbd/unwind.h" #include "ardour/async_midi_port.h" #include "ardour/audio_backend.h" @@ -81,7 +82,7 @@ PortManager::remove_all_ports () * ports know that they have nothing to do. */ - _port_remove_in_progress = true; + PBD::Unwinder uw (_port_remove_in_progress, true); /* process lock MUST be held by caller */ @@ -102,8 +103,6 @@ PortManager::remove_all_ports () */ _port_deletions_pending.reset (); - - _port_remove_in_progress = false; }