Browse Source

Fixed leak in BulletPhysicsServer

Wilson E. Alvarez 7 years ago
parent
commit
e5ae9750ed
1 changed files with 3 additions and 1 deletions
  1. 3 1
      modules/bullet/bullet_physics_server.cpp

+ 3 - 1
modules/bullet/bullet_physics_server.cpp

@@ -89,7 +89,9 @@ BulletPhysicsServer::BulletPhysicsServer() :
 		active(true),
 		active(true),
 		active_spaces_count(0) {}
 		active_spaces_count(0) {}
 
 
-BulletPhysicsServer::~BulletPhysicsServer() {}
+BulletPhysicsServer::~BulletPhysicsServer() {
+	bulletdelete(emptyShape);
+}
 
 
 RID BulletPhysicsServer::shape_create(ShapeType p_shape) {
 RID BulletPhysicsServer::shape_create(ShapeType p_shape) {
 	ShapeBullet *shape = NULL;
 	ShapeBullet *shape = NULL;