From d7792feabad6c20aa7bc25dbdeab5cf62f784236 Mon Sep 17 00:00:00 2001 From: Adelynne Brito Date: Fri, 5 Dec 2025 17:32:15 -0500 Subject: [PATCH] Move initialization check for CanvasMaterial Prevents the check from causing other materials to error --- editor/scene/material_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/scene/material_editor_plugin.cpp b/editor/scene/material_editor_plugin.cpp index 200ec8c85f3..a5554ebe295 100644 --- a/editor/scene/material_editor_plugin.cpp +++ b/editor/scene/material_editor_plugin.cpp @@ -52,7 +52,6 @@ Ref MaterialEditor::make_shader_material(const Ref &p_from, bool p_copy_params) { ERR_FAIL_COND_V(p_from.is_null(), Ref()); - ERR_FAIL_COND_V(!p_from->_is_initialized(), Ref()); Ref smat; smat.instantiate(); @@ -497,5 +496,6 @@ bool CanvasItemMaterialConversionPlugin::handles(const Ref &p_resource } Ref CanvasItemMaterialConversionPlugin::convert(const Ref &p_resource) const { + ERR_FAIL_COND_V(!Object::cast_to(*p_resource) || !Object::cast_to(*p_resource)->_is_initialized(), Ref()); return MaterialEditor::make_shader_material(p_resource); }