diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-30 09:59:09 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-30 09:59:09 +0200 |
commit | 300befdc9e0fbe8d119f01f00b1bb8c69c3ccdb4 (patch) | |
tree | c3732c40038494b1016d749a29fbdfdfa1ad341f /servers/physics_3d | |
parent | fe9f056623166af2007992250107ee2309e0b1c7 (diff) | |
parent | 8320e12ac1d0b71a1f5a2213a35aaf26378b4d9a (diff) |
Merge pull request #66641 from timothyqiu/null-joint
Fix crash when executing `PhysicsServer2D.joint_clear`
Diffstat (limited to 'servers/physics_3d')
-rw-r--r-- | servers/physics_3d/godot_physics_server_3d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/physics_3d/godot_physics_server_3d.cpp b/servers/physics_3d/godot_physics_server_3d.cpp index f3a589d469..68db5df144 100644 --- a/servers/physics_3d/godot_physics_server_3d.cpp +++ b/servers/physics_3d/godot_physics_server_3d.cpp @@ -1210,6 +1210,7 @@ RID GodotPhysicsServer3D::joint_create() { void GodotPhysicsServer3D::joint_clear(RID p_joint) { GodotJoint3D *joint = joint_owner.get_or_null(p_joint); + ERR_FAIL_NULL(joint); if (joint->get_type() != JOINT_TYPE_MAX) { GodotJoint3D *empty_joint = memnew(GodotJoint3D); empty_joint->copy_settings_from(joint); |