You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.badlogic.gdx.physics.box2d.World.destroyBody(World.java:309)
at aurelienribon.bodyeditor.canvas.rigidbodies.RigidBodiesScreen.clearWorld(Unknown Source)
at aurelienribon.bodyeditor.canvas.rigidbodies.RigidBodiesScreen.access$300(Unknown Source)
In RigidBodiesStream:
Iterator<Body> bodies = world.getBodies();
while (bodies.hasNext()) world.destroyBody(bodies.next());
This look suspicious; are you sure the iterator's backing collection isn't
modified?
A conservative approach:
boolean empty = false;
while (!empty) {
Iterator<Body> bodies = world.getBodies();
empty = !bodies.hasNext();
if (!empty) {
world.destroyBody(bodies.next());
}
}
Original issue reported on code.google.com by [email protected] on 20 Mar 2014 at 3:00
Original issue reported on code.google.com by
[email protected]
on 20 Mar 2014 at 3:00Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: