Fix Editor hanging if audiostream's pitch_scale is NaN

This commit is contained in:
stmSi 2022-12-24 12:39:48 +06:30
parent f7cf9fb148
commit 2041616934
4 changed files with 4 additions and 4 deletions

View file

@ -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<AudioStreamPlayback> &playback : stream_playbacks) {