File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,6 +367,7 @@ var InputPlugin = new Class({
367367
368368 // Clear the removal list
369369 removeList . length = 0 ;
370+ this . _pendingRemoval . length = 0 ;
370371
371372 // Move pendingInsertion to list (also clears pendingInsertion at the same time)
372373 this . _list = current . concat ( insertList . splice ( 0 ) ) ;
@@ -386,6 +387,13 @@ var InputPlugin = new Class({
386387 {
387388 var input = gameObject . input ;
388389
390+ // If GameObject.input already cleared from higher class
391+ if ( ! input )
392+ {
393+ return ;
394+ }
395+
396+ this . queueForRemoval ( gameObject ) ;
389397 input . gameObject = undefined ;
390398 input . target = undefined ;
391399 input . hitArea = undefined ;
@@ -1639,7 +1647,7 @@ var InputPlugin = new Class({
16391647 } ,
16401648
16411649 /**
1642- * The Scene that owns this plugin is being destroyed.
1650+ * The Scene that owns this plugin is being destroyed.
16431651 * We need to shutdown and then kill off all external references.
16441652 *
16451653 * @method Phaser.Input.InputPlugin#destroy
You can’t perform that action at this time.
0 commit comments