diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-03-20 21:41:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 21:41:19 +0100 |
commit | e48f0ee497b65398098151b2bd51fdc4c92de134 (patch) | |
tree | 6f6f91a26ec54f151341082f91da7ce25baa31b4 /modules/fbx/data/fbx_mesh_data.cpp | |
parent | 6608d9929156ba6bbd9252b7cbc4e9a10102aeae (diff) | |
parent | d03f4cefeab29e15762148bb741894550a205fdd (diff) |
Merge pull request #47195 from W4RH4WK/fbx-check-bone-map-access
FBX Import: Check bone map access for valid cluster target node id
Diffstat (limited to 'modules/fbx/data/fbx_mesh_data.cpp')
-rw-r--r-- | modules/fbx/data/fbx_mesh_data.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/fbx/data/fbx_mesh_data.cpp b/modules/fbx/data/fbx_mesh_data.cpp index 883651943e..b088dd8640 100644 --- a/modules/fbx/data/fbx_mesh_data.cpp +++ b/modules/fbx/data/fbx_mesh_data.cpp @@ -417,6 +417,7 @@ void FBXMeshData::sanitize_vertex_weights(const ImportState &state) { int bind_id = 0; for (const FBXDocParser::Cluster *cluster : fbx_skin->Clusters()) { + ERR_CONTINUE_MSG(!state.fbx_bone_map.has(cluster->TargetNode()->ID()), "Missing bone map for cluster target node with id " + uitos(cluster->TargetNode()->ID()) + "."); Ref<FBXBone> bone = state.fbx_bone_map[cluster->TargetNode()->ID()]; skeleton_to_skin_bind_id.insert(bone->godot_bone_id, bind_id); bind_id++; |