Skip to content

Commit

Permalink
Merge pull request #90505 from aaronp64/gltfdocument_crash
Browse files Browse the repository at this point in the history
Fix `GLTFDocument.append_from_scene` crash on null node
  • Loading branch information
akien-mga committed Apr 11, 2024
2 parents 2395b46 + b56934c commit 2e5d233
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/gltf/gltf_document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7284,6 +7284,7 @@ Node *GLTFDocument::generate_scene(Ref<GLTFState> p_state, float p_bake_fps, boo
}

Error GLTFDocument::append_from_scene(Node *p_node, Ref<GLTFState> p_state, uint32_t p_flags) {
ERR_FAIL_NULL_V(p_node, FAILED);
Ref<GLTFState> state = p_state;
ERR_FAIL_COND_V(state.is_null(), FAILED);
state->use_named_skin_binds = p_flags & GLTF_IMPORT_USE_NAMED_SKIN_BINDS;
Expand Down

0 comments on commit 2e5d233

Please sign in to comment.