Skip to content

Commit

Permalink
Assertion when adding a constraint with a NULL body
Browse files Browse the repository at this point in the history
  • Loading branch information
slembcke committed Mar 19, 2013
1 parent 820e05f commit b78d345
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cpSpace.c
Expand Up @@ -304,6 +304,7 @@ cpConstraint *
cpSpaceAddConstraint(cpSpace *space, cpConstraint *constraint)
{
cpAssertHard(!constraint->space, "This shape is already added to a space and cannot be added to another.");
cpAssertHard(constraint->a && constraint->b, "Constraint is attached to a NULL body.");
cpAssertSpaceUnlocked(space);

cpBodyActivate(constraint->a);
Expand Down

0 comments on commit b78d345

Please sign in to comment.