Browse files

Merge pull request #2 from otibom/master

Using cpShapeSet* if shape->body is NULL
  • Loading branch information...
2 parents e5cb601 + e26175d commit 643859abe98c4fa91a84b7f144268e943cbc28dd @slembcke slembcke committed Jul 28, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 include/chipmunk/cpShape.h
View
2 include/chipmunk/cpShape.h
@@ -117,7 +117,7 @@ static inline type cpShapeGet##name(const cpShape *shape){return shape->member;}
#define CP_DefineShapeStructSetter(type, member, name, activates) \
static inline void cpShapeSet##name(cpShape *shape, type value){ \
- if(activates) cpBodyActivate(shape->body); \
+ if(activates && shape->body) cpBodyActivate(shape->body); \
shape->member = value; \
}

0 comments on commit 643859a

Please sign in to comment.