diff --git a/mauplay/audio.c b/mauplay/audio.c index 1292b70..97dc10a 100644 --- a/mauplay/audio.c +++ b/mauplay/audio.c @@ -64,6 +64,11 @@ void audio_queue(const char* path) { q.sound = MDESoundOpen(q.path); q.frames = 0; + if(q.sound == NULL) { + free(q.path); + return; + } + MDEMutexLock(audio_mutex); arrput(queue, q); if(queue_seek == -1) queue_seek = arrlen(queue) - 1;