changeset 3123:60301ed80050

Set audio device handle to NULL in case of open was not successful.
author Mike Gorchak <lestat@i.com.ua>
date Thu, 14 May 2009 11:50:05 +0000
parents 6c98826d88b0
children d7174e9f65ce
files src/audio/qsa/SDL_qsa_audio.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/audio/qsa/SDL_qsa_audio.c	Thu May 14 10:54:34 2009 +0000
+++ b/src/audio/qsa/SDL_qsa_audio.c	Thu May 14 11:50:05 2009 +0000
@@ -92,7 +92,7 @@
 
 static inline void QSA_SetError(const char* fn, int status)
 {
-   SDL_SetError("QSA: %s failed: %s", fn, snd_strerror(status));
+   SDL_SetError("QSA: %s() failed: %s", fn, snd_strerror(status));
 }
 
 /* card names check to apply the workarounds */
@@ -479,6 +479,7 @@
    /* Check if requested device is opened */
    if (status<0)
    {
+      this->hidden->audio_handle=NULL;
       QSA_CloseDevice(this);
       QSA_SetError("snd_pcm_open", status);
       return 0;