Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed crash on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jan 3, 2009
1 parent 2f43156 commit 56dd9f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/audio/SDL_audio.c
Expand Up @@ -28,7 +28,7 @@
#include "SDL_audiomem.h"
#include "SDL_sysaudio.h"

#define _THIS SDL_AudioDevice *this
#define _THIS SDL_AudioDevice *this

static SDL_AudioDriver current_audio;
static SDL_AudioDevice *open_devices[16];
Expand Down Expand Up @@ -625,7 +625,9 @@ SDL_AudioInit(const char *driver_name)
initialized = 1;
best_choice = i;
} else if (rc == 1) { /* init'd, but can't see any devices. */
current_audio.impl.Deinitialize();
if (current_audio.impl.Deinitialize) {
current_audio.impl.Deinitialize();
}
if (best_choice == -1) {
best_choice = i;
}
Expand Down

0 comments on commit 56dd9f6

Please sign in to comment.