Merge pull request #13417 from AndreaCatania/patch-1
Fixed bullet server null pointer check
This commit is contained in:
commit
643200c4d2
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
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);
|
RigidBodyBullet *body = rigid_body_owner.get(p_body);
|
||||||
ERR_FAIL_COND(!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) {
|
void BulletPhysicsServer::body_set_ray_pickable(RID p_body, bool p_enable) {
|
||||||
|
|
Loading…
Reference in a new issue