13
0

use an Unwinder to provde exception-safety

This commit is contained in:
Paul Davis 2020-04-08 00:28:30 -06:00
parent 78a66b7180
commit 6a8863386a

View File

@ -32,6 +32,7 @@
#include "pbd/error.h" #include "pbd/error.h"
#include "pbd/strsplit.h" #include "pbd/strsplit.h"
#include "pbd/unwind.h"
#include "ardour/async_midi_port.h" #include "ardour/async_midi_port.h"
#include "ardour/audio_backend.h" #include "ardour/audio_backend.h"
@ -81,7 +82,7 @@ PortManager::remove_all_ports ()
* ports know that they have nothing to do. * 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 /* process lock MUST be held by caller
*/ */
@ -102,8 +103,6 @@ PortManager::remove_all_ports ()
*/ */
_port_deletions_pending.reset (); _port_deletions_pending.reset ();
_port_remove_in_progress = false;
} }