Merge pull request #92145 from jsjtxietian/doc-init

Prevent add shader uniform doc when DocTool is not inited
This commit is contained in:
Rémi Verschelde 2024-05-21 11:22:50 +02:00
commit 149e3b85aa
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -173,7 +173,7 @@ void Shader::get_shader_uniform_list(List<PropertyInfo> *p_params, bool p_get_gr
} }
} }
#ifdef TOOLS_ENABLED #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); EditorHelp::get_doc_data()->add_doc(class_doc);
} }
#endif #endif