fixed a crash in pthread_join()

pull/5/head
Oona Räisänen 2015-02-13 11:59:01 +02:00
rodzic 97d179514e
commit 0ef9d5c4bf
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -124,7 +124,10 @@ void evt_changeDevices() {
pcm.BufferDrop = FALSE;
Abort = TRUE;
pthread_join(thread1, NULL);
static int init;
if (init)
pthread_join(thread1, NULL);
init = 1;
if (pcm.handle != NULL) snd_pcm_close(pcm.handle);