mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 17:28:18 +00:00
Merge pull request #5953 from schontz/master
destroy game objects during shutdown safely #5520
This commit is contained in:
commit
42f23045b2
1 changed files with 2 additions and 6 deletions
|
@ -231,15 +231,11 @@ var DisplayList = new Class({
|
|||
{
|
||||
var list = this.list;
|
||||
|
||||
var i = list.length;
|
||||
|
||||
while (i--)
|
||||
while (list.length)
|
||||
{
|
||||
list[i].destroy(true);
|
||||
list[0].destroy(true);
|
||||
}
|
||||
|
||||
list.length = 0;
|
||||
|
||||
this.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue