Fixes #382 Error when using InputHandler#onInputUp & sprite destroys itself during the event.

This commit is contained in:
photonstorm
2014-02-10 02:14:59 +00:00
parent 0294a4735d
commit ae74cb02dd
5 changed files with 62 additions and 16 deletions
+3 -3
View File
@@ -386,7 +386,7 @@ Phaser.Pointer.prototype = {
while (currentNode != null)
}
if (this._highestRenderObject == null)
if (this._highestRenderObject === null)
{
// The pointer isn't currently over anything, check if we've got a lingering previous target
if (this.targetObject)
@@ -398,7 +398,7 @@ Phaser.Pointer.prototype = {
}
else
{
if (this.targetObject == null)
if (this.targetObject === null)
{
// And now set the new one
// console.log('And now set the new one');
@@ -409,7 +409,7 @@ Phaser.Pointer.prototype = {
{
// We've got a target from the last update
// console.log("We've got a target from the last update");
if (this.targetObject == this._highestRenderObject)
if (this.targetObject === this._highestRenderObject)
{
// Same target as before, so update it
// console.log("Same target as before, so update it");