only remove listener if scene was not already destroyed
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user