mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
audio: Fixed logic error.
This commit is contained in:
@@ -335,7 +335,7 @@ void SDL_AudioDeviceDisconnected(SDL_AudioDevice *device)
|
||||
SDL_AtomicSet(&device->shutdown, 1); // tell audio thread to terminate.
|
||||
|
||||
// if there's an audio thread, don't free until thread is terminating, otherwise free stuff now.
|
||||
const SDL_bool should_destroy = (device->thread != NULL);
|
||||
const SDL_bool should_destroy = (device->thread == NULL);
|
||||
SDL_UnlockMutex(device->lock);
|
||||
|
||||
// Post the event, if we haven't tried to before and if it's desired
|
||||
|
Reference in New Issue
Block a user