summaryrefslogtreecommitdiff
path: root/modules/fbx/data/fbx_mesh_data.cpp
diff options
context:
space:
mode:
authorAlex Hirsch <w4rh4wk@bluephoenix.at>2021-03-20 18:07:51 +0100
committerAlex Hirsch <w4rh4wk@bluephoenix.at>2021-03-20 18:07:51 +0100
commitd03f4cefeab29e15762148bb741894550a205fdd (patch)
tree853db74b839aa777b554d0d341a4d45c39b63264 /modules/fbx/data/fbx_mesh_data.cpp
parent91b51a2d321435fe2e2e8d27efb710a6a257e212 (diff)
FBX Import: Check bone map access for valid cluster target node id
fix #47184
Diffstat (limited to 'modules/fbx/data/fbx_mesh_data.cpp')
-rw-r--r--modules/fbx/data/fbx_mesh_data.cpp1
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++;