Skip to content

Commit

Permalink
Merge pull request #22841 from J08nY/fix/collision-object-macro
Browse files Browse the repository at this point in the history
Fix multi-statement macro call not being covered.
  • Loading branch information
akien-mga authored Oct 8, 2018
2 parents 328679f + 5600577 commit 0063ba9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions modules/bullet/bullet_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
new cl

#define bulletdelete(cl) \
delete cl; \
cl = NULL;

{ \
delete cl; \
cl = NULL; \
}
#endif
3 changes: 2 additions & 1 deletion modules/bullet/collision_object_bullet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,10 @@ void RigidCollisionObjectBullet::shape_changed(int p_shape_index) {

void RigidCollisionObjectBullet::reload_shapes() {

if (mainShape && mainShape->isCompound())
if (mainShape && mainShape->isCompound()) {
// Destroy compound
bulletdelete(mainShape);
}

mainShape = NULL;

Expand Down

0 comments on commit 0063ba9

Please sign in to comment.