diff options
Diffstat (limited to 'modules/bullet/bullet_physics_server.cpp')
-rw-r--r-- | modules/bullet/bullet_physics_server.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 3054debaec..6b2b0c4ad0 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -1404,8 +1404,8 @@ void BulletPhysicsServer3D::free(RID p_rid) { ShapeBullet *shape = shape_owner.get_or_null(p_rid); // Notify the shape is configured - for (Map<ShapeOwnerBullet *, int>::Element *element = shape->get_owners().front(); element; element = element->next()) { - static_cast<ShapeOwnerBullet *>(element->key())->remove_shape_full(shape); + for (const KeyValue<ShapeOwnerBullet *, int> &element : shape->get_owners()) { + static_cast<ShapeOwnerBullet *>(element.key)->remove_shape_full(shape); } shape_owner.free(p_rid); |