[Audio Threads] Add extra guard to workgroup exit
Add an extra step to the workgroup exit call, so that it only calls to leave if the join token is valid, or at least initialized. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
9cc5ba7c0e
commit
dad2dbf236
|
@ -242,7 +242,7 @@ BOOL SetPriorityRealtimeAudio(mach_port_t mach_thread_id) {
|
|||
|
||||
- (void)leaveWorkgroup {
|
||||
if(@available(macOS 11, *)) {
|
||||
if(wg && !isRealtimeError) {
|
||||
if(wg && wgToken.sig && !isRealtimeError) {
|
||||
os_workgroup_leave(wg, &wgToken);
|
||||
bzero(&wgToken, sizeof(wgToken));
|
||||
wg = nil;
|
||||
|
|
Loading…
Reference in New Issue