Commit 9c65a7a5 authored by Mike Gorchak's avatar Mike Gorchak

Set audio device handle to NULL in case of open was not successful.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403605
parent 3fa79ac6
......@@ -92,7 +92,7 @@ uint32_t qsa_capture_devices;
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 @@ static int QSA_OpenDevice(_THIS, const char* devname, int iscapture)
/* 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;
......
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