Merge pull request #5953 from schontz/master

destroy game objects during shutdown safely #5520
This commit is contained in:
Richard Davey 2022-02-28 13:46:31 +00:00 committed by GitHub
commit 42f23045b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
},