fix a crash while changing the volume

This commit is contained in:
Isaac0-dev 2024-10-08 16:04:41 +10:00
parent 45ea768590
commit 34b78700c4

View file

@ -579,6 +579,7 @@ void audio_sample_play(struct ModAudio* audio, Vec3f position, f32 volume) {
} }
void audio_custom_update_volume(void) { void audio_custom_update_volume(void) {
if (!sModAudioPool) { return; }
struct DynamicPoolNode* node = sModAudioPool->tail; struct DynamicPoolNode* node = sModAudioPool->tail;
while (node) { while (node) {
struct DynamicPoolNode* prev = node->prev; struct DynamicPoolNode* prev = node->prev;