From 20416169347ee2c365f01f6d7987dd78315488d5 Mon Sep 17 00:00:00 2001 From: stmSi Date: Sat, 24 Dec 2022 12:39:48 +0630 Subject: Fix Editor hanging if audiostream's pitch_scale is NaN --- scene/audio/audio_stream_player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/audio') diff --git a/scene/audio/audio_stream_player.cpp b/scene/audio/audio_stream_player.cpp index 03115e765f..fcd529dea4 100644 --- a/scene/audio/audio_stream_player.cpp +++ b/scene/audio/audio_stream_player.cpp @@ -111,7 +111,7 @@ float AudioStreamPlayer::get_volume_db() const { } void AudioStreamPlayer::set_pitch_scale(float p_pitch_scale) { - ERR_FAIL_COND(p_pitch_scale <= 0.0); + ERR_FAIL_COND(!(p_pitch_scale > 0.0)); pitch_scale = p_pitch_scale; for (Ref &playback : stream_playbacks) { -- cgit v1.2.3