You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Merge pull request #17918 from Alexander-Alekseev/shape_bullet_memory_leak_fix
Fix of a possible memory leak in ConcavePolygonShapeBullet::setup
This commit is contained in:
@@ -337,10 +337,10 @@ void ConcavePolygonShapeBullet::setup(PoolVector<Vector3> p_faces) {
|
|||||||
int src_face_count = faces.size();
|
int src_face_count = faces.size();
|
||||||
if (0 < src_face_count) {
|
if (0 < src_face_count) {
|
||||||
|
|
||||||
btTriangleMesh *shapeInterface = bulletnew(btTriangleMesh);
|
|
||||||
|
|
||||||
// It counts the faces and assert the array contains the correct number of vertices.
|
// It counts the faces and assert the array contains the correct number of vertices.
|
||||||
ERR_FAIL_COND(src_face_count % 3);
|
ERR_FAIL_COND(src_face_count % 3);
|
||||||
|
|
||||||
|
btTriangleMesh *shapeInterface = bulletnew(btTriangleMesh);
|
||||||
src_face_count /= 3;
|
src_face_count /= 3;
|
||||||
PoolVector<Vector3>::Read r = p_faces.read();
|
PoolVector<Vector3>::Read r = p_faces.read();
|
||||||
const Vector3 *facesr = r.ptr();
|
const Vector3 *facesr = r.ptr();
|
||||||
|
|||||||
Reference in New Issue
Block a user