diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index f47252d388a..00ca86a43bb 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -1695,7 +1695,7 @@ void EditorSceneImporterGLTF::_generate_node(GLTFState &state, int p_node, Node n->godot_nodes.push_back(node); - if (n->skin >= 0 && Object::cast_to(node)) { + if (n->skin >= 0 && n->skin < skeletons.size() && Object::cast_to(node)) { MeshInstance *mi = Object::cast_to(node); Skeleton *s = skeletons[n->skin];