Merge pull request #68181 from MarianoGnu/fix-convex-hull-crash

Avoid memory corruption when GodotConvexPolygonShape3D is setup more than once
This commit is contained in:
Rémi Verschelde 2023-02-17 00:33:47 +01:00
commit 4a1913fc17
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -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;