From 34b78700c4b14b2cead84fc6a5cbcf02d632fa49 Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:04:41 +1000 Subject: [PATCH] fix a crash while changing the volume --- src/pc/lua/utils/smlua_audio_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pc/lua/utils/smlua_audio_utils.c b/src/pc/lua/utils/smlua_audio_utils.c index 2c977053..4cde88af 100644 --- a/src/pc/lua/utils/smlua_audio_utils.c +++ b/src/pc/lua/utils/smlua_audio_utils.c @@ -579,6 +579,7 @@ void audio_sample_play(struct ModAudio* audio, Vec3f position, f32 volume) { } void audio_custom_update_volume(void) { + if (!sModAudioPool) { return; } struct DynamicPoolNode* node = sModAudioPool->tail; while (node) { struct DynamicPoolNode* prev = node->prev;