diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-04-03 12:14:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-03 12:14:39 +0200 |
commit | f56d0ad92f0bc094b854a6e127dbd2aed7a23b51 (patch) | |
tree | d66b532ac91114a3ed378b38dacdd7839d5f5d5d | |
parent | a10be201de2aac2a239568970e02dce04261bc3b (diff) | |
parent | b5692511105cddd812e687259740d2a6fa240219 (diff) |
Merge pull request #17918 from Alexander-Alekseev/shape_bullet_memory_leak_fix
Fix of a possible memory leak in ConcavePolygonShapeBullet::setup
-rw-r--r-- | modules/bullet/shape_bullet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bullet/shape_bullet.cpp b/modules/bullet/shape_bullet.cpp index 5d8d391bd9..9cbf83689b 100644 --- a/modules/bullet/shape_bullet.cpp +++ b/modules/bullet/shape_bullet.cpp @@ -337,10 +337,10 @@ void ConcavePolygonShapeBullet::setup(PoolVector<Vector3> p_faces) { int src_face_count = faces.size(); if (0 < src_face_count) { - btTriangleMesh *shapeInterface = bulletnew(btTriangleMesh); - // It counts the faces and assert the array contains the correct number of vertices. ERR_FAIL_COND(src_face_count % 3); + + btTriangleMesh *shapeInterface = bulletnew(btTriangleMesh); src_face_count /= 3; PoolVector<Vector3>::Read r = p_faces.read(); const Vector3 *facesr = r.ptr(); |