# HG changeset patch
# User Mike Gorchak <lestat@i.com.ua>
# Date 1242301805 0
# Node ID 60301ed80050028a420977cba0cfe2f787a5d779
# Parent  6c98826d88b05becc2c1e9207d961029e45efbb9
Set audio device handle to NULL in case of open was not successful.

diff -r 6c98826d88b0 -r 60301ed80050 src/audio/qsa/SDL_qsa_audio.c
--- 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;