diff --git a/fxgl-core/src/main/kotlin/com/almasb/fxgl/particle/ParticleSystem.kt b/fxgl-core/src/main/kotlin/com/almasb/fxgl/particle/ParticleSystem.kt index 121a49fc2..2cd6e6b01 100644 --- a/fxgl-core/src/main/kotlin/com/almasb/fxgl/particle/ParticleSystem.kt +++ b/fxgl-core/src/main/kotlin/com/almasb/fxgl/particle/ParticleSystem.kt @@ -48,7 +48,7 @@ class ParticleSystem : Updatable { iter.remove() pane.children.remove(particle.view) - Pools.free(p) + Pools.free(particle) } else { if (particle.view.parent == null) pane.children.add(particle.view)