summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorHayden Leete <haydenleete@gmail.com>2022-06-01 17:08:11 +1200
committerHayden Leete <haydenleete@gmail.com>2022-07-14 14:15:02 +1200
commitfded50fcedb073db08d0520bfde4f418aa7324f8 (patch)
tree130d31e6712448a3eae6de341870b1a2ba7b3d6e /scene/3d
parent5fec0d232a41a6e99bf4e00222a88bce719637cc (diff)
prevent crash on NaN offset in path_follower 2d and 3d
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/path_3d.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/3d/path_3d.cpp b/scene/3d/path_3d.cpp
index f53e783fbd..1f10337b4c 100644
--- a/scene/3d/path_3d.cpp
+++ b/scene/3d/path_3d.cpp
@@ -397,6 +397,7 @@ void PathFollow3D::_bind_methods() {
}
void PathFollow3D::set_offset(real_t p_offset) {
+ ERR_FAIL_COND(!isfinite(p_offset));
prev_offset = offset;
offset = p_offset;