diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-09-30 10:36:05 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2022-09-30 10:36:05 +0800 |
commit | 8320e12ac1d0b71a1f5a2213a35aaf26378b4d9a (patch) | |
tree | 6d1f0d3804f415ef5cc68a9598ea573130c245ac /servers/physics_3d | |
parent | 56563ef09e779b9f4b105fea0e5a1a8e59c7cfe8 (diff) |
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); |