summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-29 14:50:44 +0200
committerGitHub <noreply@github.com>2018-08-29 14:50:44 +0200
commit27ae49ea29467d3e4bf1129d2ac6203522f8748a (patch)
tree5a80540eff1d82f32ed79cbb8539e7aa36d36319
parent24ecc4abb092926eb9ce21566add04bcfce8586b (diff)
parent2a823a38accefab2c1a4c2310cc95c9b747907bf (diff)
Merge pull request #21564 from ibrahn/fix-move-slide-crash
Initialise rays_found count in test_ray_separation.
-rw-r--r--modules/bullet/space_bullet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/bullet/space_bullet.cpp b/modules/bullet/space_bullet.cpp
index 4a11bec5af..b12925b073 100644
--- a/modules/bullet/space_bullet.cpp
+++ b/modules/bullet/space_bullet.cpp
@@ -980,7 +980,7 @@ int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform &p
btVector3 recover_motion(0, 0, 0);
- int rays_found;
+ int rays_found = 0;
for (int t(RECOVERING_MOVEMENT_CYCLES); 0 < t; --t) {
int last_ray_index = recover_from_penetration_ray(p_body, body_transform, RECOVERING_MOVEMENT_SCALE, p_infinite_inertia, p_result_max, recover_motion, r_results);