summaryrefslogtreecommitdiff
path: root/scene/audio/audio_player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/audio/audio_player.cpp')
-rw-r--r--scene/audio/audio_player.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index 863b278b62..7a9f2bd8d0 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -192,6 +192,7 @@ float AudioStreamPlayer::get_volume_db() const {
}
void AudioStreamPlayer::set_pitch_scale(float p_pitch_scale) {
+ ERR_FAIL_COND(p_pitch_scale <= 0.0);
pitch_scale = p_pitch_scale;
}
float AudioStreamPlayer::get_pitch_scale() const {