Commit 7ed73609 authored by Sam Lantinga's avatar Sam Lantinga

Fixed crash on Windows

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403441
parent f47511d4
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "SDL_audiomem.h" #include "SDL_audiomem.h"
#include "SDL_sysaudio.h" #include "SDL_sysaudio.h"
#define _THIS SDL_AudioDevice *this #define _THIS SDL_AudioDevice *this
static SDL_AudioDriver current_audio; static SDL_AudioDriver current_audio;
static SDL_AudioDevice *open_devices[16]; static SDL_AudioDevice *open_devices[16];
...@@ -625,7 +625,9 @@ SDL_AudioInit(const char *driver_name) ...@@ -625,7 +625,9 @@ SDL_AudioInit(const char *driver_name)
initialized = 1; initialized = 1;
best_choice = i; best_choice = i;
} else if (rc == 1) { /* init'd, but can't see any devices. */ } 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) { if (best_choice == -1) {
best_choice = i; best_choice = i;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment