From d1cd0c4780aa8f184d891e38149092f97eedbc00 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Mon, 20 May 2024 12:26:26 +0800 Subject: [PATCH] Prevent add shader uniform doc when DocTool is not inited --- scene/resources/shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp index 8267e958b42..dfe5bd4a472 100644 --- a/scene/resources/shader.cpp +++ b/scene/resources/shader.cpp @@ -173,7 +173,7 @@ void Shader::get_shader_uniform_list(List *p_params, bool p_get_gr } } #ifdef TOOLS_ENABLED - if (Engine::get_singleton()->is_editor_hint() && !class_doc.name.is_empty() && p_params) { + if (EditorHelp::get_doc_data() != nullptr && Engine::get_singleton()->is_editor_hint() && !class_doc.name.is_empty() && p_params) { EditorHelp::get_doc_data()->add_doc(class_doc); } #endif