Skip to content

Commit 2e5d233

Browse files
committed
Merge pull request godotengine#90505 from aaronp64/gltfdocument_crash
Fix `GLTFDocument.append_from_scene` crash on null node
2 parents 2395b46 + b56934c commit 2e5d233

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)