From 5dafeb94e3adb5f86842a44fa4250bb68f80b219 Mon Sep 17 00:00:00 2001 From: Michael Alexsander Date: Thu, 5 Nov 2020 08:44:53 -0300 Subject: [PATCH] Disallow setting the AudioServer's 'global_rate_scale' to a value equal or inferior to 0 (cherry picked from commit d7f2c31a05458f672f8f85c4cae6eccb9de09981) --- servers/audio_server.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index c4f1a95ce4a..8268f151494 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -947,6 +947,7 @@ bool AudioServer::is_bus_channel_active(int p_bus, int p_channel) const { } void AudioServer::set_global_rate_scale(float p_scale) { + ERR_FAIL_COND(p_scale <= 0); global_rate_scale = p_scale; }