Skip to content

Commit b56934c

Browse files
committed
Fix GLTFDocument.append_from_scene() crash on null node
Added null check for p_node parameter to give error instead of crash Fixes #90502
1 parent 83b916b commit b56934c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/gltf/gltf_document.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7284,6 +7284,7 @@ Node *GLTFDocument::generate_scene(Ref<GLTFState> p_state, float p_bake_fps, boo
72847284
}
72857285

72867286
Error GLTFDocument::append_from_scene(Node *p_node, Ref<GLTFState> p_state, uint32_t p_flags) {
7287+
ERR_FAIL_NULL_V(p_node, FAILED);
72877288
Ref<GLTFState> state = p_state;
72887289
ERR_FAIL_COND_V(state.is_null(), FAILED);
72897290
state->use_named_skin_binds = p_flags & GLTF_IMPORT_USE_NAMED_SKIN_BINDS;

0 commit comments

Comments
 (0)