mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
This commit is contained in:
parent
8aefd0fe9b
commit
46cc05a377
2 changed files with 3 additions and 3 deletions
|
@ -322,7 +322,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
|
|||
|
||||
### Bug Fixes
|
||||
|
||||
*
|
||||
* Groups now check for `child.parent` before calling `removeFromHash` (thanks @spayton #2323 #2338)
|
||||
|
||||
### Pixi Updates
|
||||
|
||||
|
|
|
@ -289,7 +289,7 @@ Phaser.Group.prototype.add = function (child, silent) {
|
|||
|
||||
if (child.parent !== this)
|
||||
{
|
||||
if (child.body)
|
||||
if (child.body && child.parent)
|
||||
{
|
||||
child.parent.removeFromHash(child);
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ Phaser.Group.prototype.addAt = function (child, index, silent) {
|
|||
|
||||
if (child.parent !== this)
|
||||
{
|
||||
if (child.body)
|
||||
if (child.body && child.parent)
|
||||
{
|
||||
child.parent.removeFromHash(child);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue