Make sure that snd_pcm_open returned a valid handle before using it.
This commit is contained in:
parent
79916df96b
commit
50149af8b5
|
@ -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" );
|
||||
|
|
Loading…
Reference in New Issue