diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-22 17:26:31 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-22 17:27:01 -0300 |
commit | 9efc6d85d86dcb469b458dabe382e641f67ea729 (patch) | |
tree | bc63a8cf0e57da4c2a2a98698112b658a04f64be /editor/import | |
parent | 7a9e4c26024e93fd5ab7a39fd62d63d5ea074d1a (diff) |
Do not crash on invalid file, closes #21083
Diffstat (limited to 'editor/import')
-rw-r--r-- | editor/import/editor_scene_importer_gltf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index f47252d388..00ca86a43b 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<MeshInstance>(node)) { + if (n->skin >= 0 && n->skin < skeletons.size() && Object::cast_to<MeshInstance>(node)) { MeshInstance *mi = Object::cast_to<MeshInstance>(node); Skeleton *s = skeletons[n->skin]; |