Merge pull request #55245 from jitspoe/master.gltf_export_missing_skin_crash_fix

This commit is contained in:
Rémi Verschelde 2021-11-23 10:56:41 +01:00 committed by GitHub
commit e32dbb987b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6115,7 +6115,10 @@ void GLTFDocument::_convert_mesh_instances(Ref<GLTFState> state) {
int bone_cnt = skeleton->get_bone_count();
ERR_FAIL_COND(bone_cnt != gltf_skeleton->joints.size());
ObjectID gltf_skin_key = skin->get_instance_id();
ObjectID gltf_skin_key;
if (skin.is_valid()) {
gltf_skin_key = skin->get_instance_id();
}
ObjectID gltf_skel_key = godot_skeleton->get_instance_id();
GLTFSkinIndex skin_gltf_i = -1;
GLTFNodeIndex root_gltf_i = -1;