use an Unwinder to provde exception-safety
This commit is contained in:
parent
78a66b7180
commit
6a8863386a
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user