changeset 2979:d578ae900755

Fixed crash on Windows
author Sam Lantinga <slouken@libsdl.org>
date Sat, 03 Jan 2009 07:33:42 +0000
parents 4c9130d66e2c
children 8789e4b0e0e7
files src/audio/SDL_audio.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audio/SDL_audio.c	Sat Jan 03 07:23:11 2009 +0000
+++ b/src/audio/SDL_audio.c	Sat Jan 03 07:33:42 2009 +0000
@@ -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];
@@ -625,7 +625,9 @@
             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;
             }