photonstorm/phaser — pull request #1417 by pnstickne (2014-12-06 03:38:02+00:00)
Title: Fixes #1410

As pointed out, `newChild.parent` could be accessed after it was set to
undefined. This fix unifies the code from the various `destroy` methods so
the previou issue does not occur.