Skip to content

Commit 478c965

Browse files
committed
Fix #7045. Check if game object exists before destroying it when stopping a scene.
1 parent e4104e5 commit 478c965

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gameobjects/DisplayList.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,10 @@ var DisplayList = new Class({
239239

240240
while (i--)
241241
{
242-
list[i].destroy(true);
242+
if (list[i])
243+
{
244+
list[i].destroy(true);
245+
}
243246
}
244247

245248
list.length = 0;

0 commit comments

Comments
 (0)