summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-08 13:30:25 +0200
committerGitHub <noreply@github.com>2018-10-08 13:30:25 +0200
commit0063ba92075094b7cc9d36f4551080b89e0c0e50 (patch)
treeb34b39b8f8dca806e0b0be82ca962a08592050b7 /modules
parent328679fddd426040a9af4891e937cbadb03371dd (diff)
parent56005772cd2fcbd095f2d14c6d13e83e632d0775 (diff)
Merge pull request #22841 from J08nY/fix/collision-object-macro
Fix multi-statement macro call not being covered.
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/bullet_utilities.h7
-rw-r--r--modules/bullet/collision_object_bullet.cpp3
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/bullet/bullet_utilities.h b/modules/bullet/bullet_utilities.h
index 029eb6691a..553c1d0384 100644
--- a/modules/bullet/bullet_utilities.h
+++ b/modules/bullet/bullet_utilities.h
@@ -39,7 +39,8 @@
new cl
#define bulletdelete(cl) \
- delete cl; \
- cl = NULL;
-
+ { \
+ delete cl; \
+ cl = NULL; \
+ }
#endif
diff --git a/modules/bullet/collision_object_bullet.cpp b/modules/bullet/collision_object_bullet.cpp
index a3944b4f99..402a276f95 100644
--- a/modules/bullet/collision_object_bullet.cpp
+++ b/modules/bullet/collision_object_bullet.cpp
@@ -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;