diff --git a/front/src/Phaser/Companion/Companion.ts b/front/src/Phaser/Companion/Companion.ts index 407b7326..2d11110e 100644 --- a/front/src/Phaser/Companion/Companion.ts +++ b/front/src/Phaser/Companion/Companion.ts @@ -212,7 +212,9 @@ export class Companion extends Container { } } - this.scene.events.removeListener('update', this.step, this); + if (this.scene) { + this.scene.events.removeListener('update', this.step, this); + } super.destroy(); }