From d659d6c5ca591eb287331f8decda2016ac5fd541 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Thu, 27 Nov 2025 04:50:35 +0900 Subject: [PATCH] check for return --- mauplay/audio.c | 5 +++++ 1 file changed, 5 insertions(+) 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;