mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Calling Impact.World.remove(body) during a Body.updateCallback would cause the internal loop to crash when trying to access a now missing body. Two extra checks are in place to avoid this
This commit is contained in:
parent
211ce8c378
commit
7aae84a790
2 changed files with 3 additions and 2 deletions
|
@ -73,6 +73,7 @@
|
|||
* LoaderPlugin.isReady referenced a constant that no longer exists. Fix #3503 (thanks @Twilrom)
|
||||
* Tween Timeline.destroy was trying to call `destroy` on Tweens instead of `stop` (thanks @Antriel)
|
||||
* Calling `setOffset` on a Static Arcade Physics Body would break because the method was missing. It has been added and now functions as expected. Fix #3465 (thanks @josephjaniga and @DouglasLapsley)
|
||||
* Calling Impact.World.remove(body) during a Body.updateCallback would cause the internal loop to crash when trying to access a now missing body. Two extra checks are in place to avoid this (thanks @iamDecode)
|
||||
|
||||
### Updates
|
||||
|
||||
|
|
|
@ -632,7 +632,7 @@ var World = new Class({
|
|||
{
|
||||
body = bodies[i];
|
||||
|
||||
if (!body.skipHash())
|
||||
if (body && !body.skipHash())
|
||||
{
|
||||
this.checkHash(body, hash, size);
|
||||
}
|
||||
|
@ -648,7 +648,7 @@ var World = new Class({
|
|||
{
|
||||
body = bodies[i];
|
||||
|
||||
if (body.willDrawDebug())
|
||||
if (body && body.willDrawDebug())
|
||||
{
|
||||
body.drawDebug(graphics);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue