diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-07 13:24:26 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-07 13:24:26 +0100 |
commit | df2b41f3b796837ca4a2d4d752b122f9ce2d9214 (patch) | |
tree | fb84f44b7ab17224ec22e8bfc1fb8f5a2cb6e507 | |
parent | eb1734c95d56c2017f5a215c56d56abefcedb4d9 (diff) | |
parent | 627b9ca049b5bec439c2a05642eab6602b2ad630 (diff) |
Merge pull request #69627 from RumblingTurtle/editor-scene-importer-crash-fix
Fix crash on old scene reimport
-rw-r--r-- | modules/gltf/editor/editor_scene_importer_gltf.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/gltf/editor/editor_scene_importer_gltf.cpp b/modules/gltf/editor/editor_scene_importer_gltf.cpp index 3cf49a3046..a194719b91 100644 --- a/modules/gltf/editor/editor_scene_importer_gltf.cpp +++ b/modules/gltf/editor/editor_scene_importer_gltf.cpp @@ -63,7 +63,12 @@ Node *EditorSceneFormatImporterGLTF::import_scene(const String &p_path, uint32_t if (p_options.has("animation/import")) { state->set_create_animations(bool(p_options["animation/import"])); } - return doc->generate_scene(state, (float)p_options["animation/fps"], (bool)p_options["animation/trimming"]); + + if (p_options.has("animation/trimming")) { + return doc->generate_scene(state, (float)p_options["animation/fps"], (bool)p_options["animation/trimming"]); + } else { + return doc->generate_scene(state, (float)p_options["animation/fps"], false); + } } #endif // TOOLS_ENABLED |