Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Set audio device handle to NULL in case of open was not successful.
Browse files Browse the repository at this point in the history
  • Loading branch information
llmike committed May 14, 2009
1 parent f6e5ee2 commit de2f583
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/audio/qsa/SDL_qsa_audio.c
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit de2f583

Please sign in to comment.