Skip to content

Commit

Permalink
Don't assert if an audio backend reports the same device disconnected…
Browse files Browse the repository at this point in the history
… twice.
  • Loading branch information
icculus committed Mar 19, 2015
1 parent 7c4b88f commit 75973f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/audio/SDL_audio.c
Expand Up @@ -424,7 +424,10 @@ SDL_AddAudioDevice(const int iscapture, const char *name, void *handle)
void SDL_OpenedAudioDeviceDisconnected(SDL_AudioDevice *device)
{
SDL_assert(get_audio_device(device->id) == device);
SDL_assert(device->enabled); /* called more than once?! */

if (!device->enabled) {
return;
}

/* Ends the audio callback and mark the device as STOPPED, but the
app still needs to close the device to free resources. */
Expand Down

0 comments on commit 75973f8

Please sign in to comment.