check for return
This commit is contained in:
parent
350781ca8a
commit
d659d6c5ca
1 changed files with 5 additions and 0 deletions
|
|
@ -64,6 +64,11 @@ void audio_queue(const char* path) {
|
||||||
q.sound = MDESoundOpen(q.path);
|
q.sound = MDESoundOpen(q.path);
|
||||||
q.frames = 0;
|
q.frames = 0;
|
||||||
|
|
||||||
|
if(q.sound == NULL) {
|
||||||
|
free(q.path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MDEMutexLock(audio_mutex);
|
MDEMutexLock(audio_mutex);
|
||||||
arrput(queue, q);
|
arrput(queue, q);
|
||||||
if(queue_seek == -1) queue_seek = arrlen(queue) - 1;
|
if(queue_seek == -1) queue_seek = arrlen(queue) - 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue