mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Using pendingRemove flag when destroying BaseSound
This commit is contained in:
parent
5d5acb40a9
commit
03187ae8b5
1 changed files with 4 additions and 1 deletions
|
@ -285,7 +285,10 @@ var BaseSound = new Class({
|
|||
*/
|
||||
update: NOOP,
|
||||
destroy: function () {
|
||||
this.manager.remove(this); // TODO replace with pendingRemove
|
||||
if (this.pendingRemove) {
|
||||
return;
|
||||
}
|
||||
this.pendingRemove = true;
|
||||
this.manager = null;
|
||||
this.key = '';
|
||||
this.isPlaying = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue