From efd70f3e040f883659f82b56b7e2715fc1cf911e Mon Sep 17 00:00:00 2001 From: TrueJole Date: Thu, 16 Jul 2026 09:17:05 +0200 Subject: [PATCH] Add null checking to append_gltf_node (cherry picked from commit 3078674600bcf971cde0f3e1abed65e65b18b593) --- modules/gltf/gltf_state.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/gltf/gltf_state.cpp b/modules/gltf/gltf_state.cpp index 667b5e5c89..de1ea267b0 100644 --- a/modules/gltf/gltf_state.cpp +++ b/modules/gltf/gltf_state.cpp @@ -480,6 +480,7 @@ GLTFBufferViewIndex GLTFState::append_data_to_buffers(const Vector &p_d } GLTFNodeIndex GLTFState::append_gltf_node(Ref 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);