From fb7528829b776d515219e2c84bcbf6e92994f1db Mon Sep 17 00:00:00 2001 From: Bruno Dilly Date: Fri, 10 Aug 2012 21:04:16 +0000 Subject: [PATCH] EPhysics: avoid invalid read / writes on world free Looks like we'll need to fix discrete dynamics world destructor on bullet, but current revision is kind of messed. I'll see what I can do later. And yes, it will leak the ddw until it's fixed. SVN revision: 75145 --- legacy/ephysics/src/lib/ephysics_world.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/legacy/ephysics/src/lib/ephysics_world.cpp b/legacy/ephysics/src/lib/ephysics_world.cpp index a93d444df4..97082c755c 100644 --- a/legacy/ephysics/src/lib/ephysics_world.cpp +++ b/legacy/ephysics/src/lib/ephysics_world.cpp @@ -155,11 +155,15 @@ _ephysics_world_free(EPhysics_World *world) } ephysics_camera_del(world->camera); + /* FIXME uncomment lines above when dynamicsworld destructor is fixed + on bullet. Right now looks like it will try to acess invalid memory.*/ + /* delete world->dynamics_world; delete world->solver; + delete world->broadphase; delete world->dispatcher; delete world->collision; - delete world->broadphase; + */ free(world); INF("World %p deleted.", world);