Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-05-30 09:17:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-30 09:17:04 +0300
commit36d47ce2035a8eb6912f299e848b487a8431abcd (patch)
tree481517a9b010e926928e0afc5a4221216661170d /extern/bullet2
parent8b494e03be2adc1be3ba050649e6802748a2bf5b (diff)
Fix leak in BMesh convex hull operator
Diffstat (limited to 'extern/bullet2')
-rw-r--r--extern/bullet2/src/Bullet-C-Api.h1
-rw-r--r--extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/extern/bullet2/src/Bullet-C-Api.h b/extern/bullet2/src/Bullet-C-Api.h
index 2eabf3840e1..5d00f7e3ac3 100644
--- a/extern/bullet2/src/Bullet-C-Api.h
+++ b/extern/bullet2/src/Bullet-C-Api.h
@@ -171,6 +171,7 @@ extern "C" {
/* Convex Hull */
PL_DECLARE_HANDLE(plConvexHull);
plConvexHull plConvexHullCompute(float (*coords)[3], int count);
+ void plConvexHullDelete(plConvexHull hull);
int plConvexHullNumVertices(plConvexHull hull);
int plConvexHullNumFaces(plConvexHull hull);
void plConvexHullGetVertex(plConvexHull hull, int n, float coords[3], int *original_index);
diff --git a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
index 21f0aa93220..e1f69afe101 100644
--- a/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
+++ b/extern/bullet2/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
@@ -413,6 +413,12 @@ plConvexHull plConvexHullCompute(float (*coords)[3], int count)
return reinterpret_cast<plConvexHull>(computer);
}
+void plConvexHullDelete(plConvexHull hull)
+{
+ btConvexHullComputer *computer(reinterpret_cast< btConvexHullComputer* >(hull));
+ delete computer;
+}
+
int plConvexHullNumVertices(plConvexHull hull)
{
btConvexHullComputer *computer(reinterpret_cast< btConvexHullComputer* >(hull));