From b56934ce19f481b1c06b32abdd4db45737e50ebf Mon Sep 17 00:00:00 2001 From: aaronp64 Date: Wed, 10 Apr 2024 17:05:54 -0400 Subject: [PATCH] Fix GLTFDocument.append_from_scene() crash on null node Added null check for p_node parameter to give error instead of crash Fixes #90502 --- modules/gltf/gltf_document.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index 6e7ca370dd1..2b3a00a2245 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -7284,6 +7284,7 @@ Node *GLTFDocument::generate_scene(Ref p_state, float p_bake_fps, boo } Error GLTFDocument::append_from_scene(Node *p_node, Ref p_state, uint32_t p_flags) { + ERR_FAIL_NULL_V(p_node, FAILED); Ref state = p_state; ERR_FAIL_COND_V(state.is_null(), FAILED); state->use_named_skin_binds = p_flags & GLTF_IMPORT_USE_NAMED_SKIN_BINDS;