diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2020-04-08 00:28:30 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2020-04-08 00:28:30 -0600 |
commit | 6a8863386a272c4ca37459c586fb34f9ad46cfc0 (patch) | |
tree | f0a3e957e9c3f23ca30e95afffd6f0b0dbbf9335 /libs | |
parent | 78a66b71803bda9157ef361d815f3b148cec5a8d (diff) |
use an Unwinder to provde exception-safety
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/port_manager.cc | 5 |
1 files 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<bool> 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; } |