diff --git a/modules/gltf/structures/gltf_node.cpp b/modules/gltf/structures/gltf_node.cpp index dc4f28154c..980c214db9 100644 --- a/modules/gltf/structures/gltf_node.cpp +++ b/modules/gltf/structures/gltf_node.cpp @@ -212,6 +212,7 @@ void GLTFNode::set_additional_data(const StringName &p_extension_name, Variant p } NodePath GLTFNode::get_scene_node_path(Ref p_state, bool p_handle_skeletons) { + ERR_FAIL_COND_V_MSG(p_state.is_null(), NodePath(), "Cannot get scene node path because GLTFState is null."); Vector path; Vector subpath; Ref current_gltf_node = this;