summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2017-12-01 11:26:02 +0700
committerGitHub <noreply@github.com>2017-12-01 11:26:02 +0700
commit643200c4d24e2b4479c17bbc1a3d176e3e51d95f (patch)
tree552a6890e71fa27153fd2d1e16c72f59f1a4b135
parentd2e05b6e9bca9fcc9b7acaa74b4dbc7602982bbc (diff)
parent2336927043db918167c851dcfe41dc15ffff72b2 (diff)
Merge pull request #13417 from AndreaCatania/patch-1
Fixed bullet server null pointer check
-rw-r--r--modules/bullet/bullet_physics_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index 7f95d16ba6..6e9ed0e318 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -798,7 +798,7 @@ bool BulletPhysicsServer::body_is_omitting_force_integration(RID p_body) const {
void BulletPhysicsServer::body_set_force_integration_callback(RID p_body, Object *p_receiver, const StringName &p_method, const Variant &p_udata) {
RigidBodyBullet *body = rigid_body_owner.get(p_body);
ERR_FAIL_COND(!body);
- body->set_force_integration_callback(p_receiver->get_instance_id(), p_method, p_udata);
+ body->set_force_integration_callback(p_receiver ? p_receiver->get_instance_id() : ObjectID(0), p_method, p_udata);
}
void BulletPhysicsServer::body_set_ray_pickable(RID p_body, bool p_enable) {