Skip to content

Commit 927c145

Browse files
committed
Destroy will remove the listener from Video.onChangeSource.
1 parent bf25e67 commit 927c145

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/gameobjects/components/Destroy.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ Phaser.Component.Destroy.prototype = {
102102
this._frame = null;
103103
}
104104

105+
if (Phaser.Video && this.key instanceof Phaser.Video)
106+
{
107+
this.key.onChangeSource.remove(this.resizeFrame, this);
108+
}
109+
105110
this.alive = false;
106111
this.exists = false;
107112
this.visible = false;

0 commit comments

Comments
 (0)