diff --git a/src/physics/triangle_mesh.cpp b/src/physics/triangle_mesh.cpp index 497d67f83..519b038e3 100644 --- a/src/physics/triangle_mesh.cpp +++ b/src/physics/triangle_mesh.cpp @@ -98,7 +98,11 @@ void TriangleMesh::removeBody() { World::getWorld()->getPhysics()->removeBody(m_body); delete m_body; - m_body = 0; + delete m_motion_state; + delete m_collision_shape; + m_body = NULL; + m_motion_state = NULL; + m_collision_shape = NULL; } // removeBody // -----------------------------------------------------------------------------