Fix crash when executing PhysicsServer2D.joint_clear
This commit is contained in:
parent
56563ef09e
commit
8320e12ac1
2 changed files with 18 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue