diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-10-04 12:08:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 12:08:14 +0200 |
commit | a8f53dccedd052db4d54cd90d3fc693c60c922de (patch) | |
tree | cee107a6569db003ca2151fadd3717682bca6c8a /servers | |
parent | 7e5ad362a594d8da41afb37437c1040272b9285c (diff) | |
parent | f3816898fad9a96becf622f8ac4839b6bfe3e1c2 (diff) |
Merge pull request #53381 from timothyqiu/soft-body
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_3d/soft_body_3d_sw.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_3d/soft_body_3d_sw.cpp b/servers/physics_3d/soft_body_3d_sw.cpp index 5e8f8692ba..7d173f9294 100644 --- a/servers/physics_3d/soft_body_3d_sw.cpp +++ b/servers/physics_3d/soft_body_3d_sw.cpp @@ -567,7 +567,7 @@ bool SoftBody3DSW::create_from_trimesh(const Vector<int> &p_indices, const Vecto for (uint32_t i = 0; i < pinned_count; ++i) { int pinned_vertex = pinned_vertices[i]; - ERR_CONTINUE(pinned_vertex >= visual_vertex_count); + ERR_CONTINUE(pinned_vertex < 0 || pinned_vertex >= visual_vertex_count); uint32_t node_index = map_visual_to_physics[pinned_vertex]; ERR_CONTINUE(node_index >= node_count); |