fixed #569: change the free sequence to avoid bug

This commit is contained in:
minggo 2011-07-07 15:20:13 +08:00
parent 8e370eeb10
commit 8ca8f4d9bc
1 changed files with 3 additions and 3 deletions

View File

@ -65,11 +65,11 @@ blockerSeparate(cpArbiter *arb, cpSpace *space, void *unused)
static void
postStepRemove(cpSpace *space, cpShape *shape, void *unused)
{
{
cpSpaceRemoveShape(space, shape);
cpSpaceRemoveBody(space, shape->body);
cpBodyFree(shape->body);
cpSpaceRemoveShape(space, shape);
cpShapeFree(shape);
}