Add null checking to append_gltf_node

(cherry picked from commit 3078674600bcf971cde0f3e1abed65e65b18b593)
This commit is contained in:
TrueJole authored and Thaddeus Crews committed 2026-07-25 13:19:50 -05:00
1 parent ad96f9d95f
commit efd70f3e04
1 file changed
+1
+1
View File
@@ -480,6 +480,7 @@ GLTFBufferViewIndex GLTFState::append_data_to_buffers(const Vector<uint8_t> &p_d
}
GLTFNodeIndex GLTFState::append_gltf_node(Ref<GLTFNode> p_gltf_node, Node *p_godot_scene_node, GLTFNodeIndex p_parent_node_index) {
ERR_FAIL_COND_V(p_gltf_node.is_null(), GLTFNodeIndex(0));
p_gltf_node->set_parent(p_parent_node_index);
const GLTFNodeIndex new_index = nodes.size();
nodes.append(p_gltf_node);