summaryrefslogtreecommitdiff
path: root/modules/bullet/collision_object_bullet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bullet/collision_object_bullet.cpp')
-rw-r--r--modules/bullet/collision_object_bullet.cpp3
1 files changed, 2 insertions, 1 deletions
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;