diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-17 00:33:47 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-17 00:33:47 +0100 |
commit | 4a1913fc17b9c143f34b3fc436f12dd285941aec (patch) | |
tree | 038c234c8ea747b14a6c17db66e40932d0751973 /servers | |
parent | b90d70d592e65749a06c08991b48999af1f720f8 (diff) | |
parent | a39ac1383b1ee2f837ff07c9dfe207c481c62e5b (diff) |
Merge pull request #68181 from MarianoGnu/fix-convex-hull-crash
Avoid memory corruption when GodotConvexPolygonShape3D is setup more than once
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics_3d/godot_shape_3d.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/physics_3d/godot_shape_3d.cpp b/servers/physics_3d/godot_shape_3d.cpp index 300dca4e08..d566d612ce 100644 --- a/servers/physics_3d/godot_shape_3d.cpp +++ b/servers/physics_3d/godot_shape_3d.cpp @@ -1092,6 +1092,8 @@ void GodotConvexPolygonShape3D::_setup(const Vector<Vector3> &p_vertices) { if (err != OK) { ERR_PRINT("Failed to build convex hull"); } + extreme_vertices.resize(0); + vertex_neighbors.resize(0); AABB _aabb; |