Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit d5d72b8

Browse files
committed
Do the removal when the world is unlocked
1 parent a59b10d commit d5d72b8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/src/dynamics/world.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,11 @@ class World {
470470
clearForces();
471471
}
472472

473+
_flags &= ~LOCKED;
474+
473475
// Destroy all bodies that have been marked for destruction
474476
_destroyBodies.forEach((body) => _destroyBody(body));
475477
_destroyBodies.clear();
476-
477-
_flags &= ~LOCKED;
478-
479478
_profile.step.record(stepTimer.getMilliseconds());
480479
}
481480

0 commit comments

Comments
 (0)