diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-23 15:39:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-23 15:39:46 +0200 |
commit | 78dae322471fd7e8af5ec26e8fe82e57eb567a74 (patch) | |
tree | 82e2604ba4e126fb8d59ca6b5f0488bbe1010b3d /modules/gltf | |
parent | 995093f59dee9b55878991e94b1476b0a7437650 (diff) | |
parent | 2cd347f4fa174fc71d04ca93f7a7a7d60f68af40 (diff) |
Merge pull request #50764 from AndreaCatania/AndreaCatania-patch-4
Fix GLTF crash when the material is not set.
Diffstat (limited to 'modules/gltf')
-rw-r--r-- | modules/gltf/gltf_document.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 09bae884b9..30d023606f 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -2796,7 +2796,7 @@ Error GLTFDocument::_parse_meshes(Ref<GLTFState> state) { mat = mat3d; } - import_mesh->add_surface(primitive, array, morphs, Dictionary(), mat, mat->get_name()); + import_mesh->add_surface(primitive, array, morphs, Dictionary(), mat, mat.is_valid() ? mat->get_name() : String()); } Vector<float> blend_weights; |