Make sure that snd_pcm_open returned a valid handle before using it.

This commit is contained in:
Alexandre Julliard 2003-04-27 00:38:39 +00:00
parent 79916df96b
commit 50149af8b5
1 changed files with 1 additions and 0 deletions

View File

@ -432,6 +432,7 @@ LONG ALSA_WaveInit(void)
ALSA_WodNumDevs = 0;
EXIT_ON_ERROR( snd_pcm_open(&h, wwo->device, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK) , "open pcm" );
if (!h) return -1;
ALSA_WodNumDevs++;
EXIT_ON_ERROR( snd_pcm_info(h, info) , "pcm info" );