diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/renderer_storage_rd.cpp | 4 | ||||
-rw-r--r-- | servers/rendering/renderer_scene_cull.cpp | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp index 7e280ea3e8..c592fcfe00 100644 --- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp +++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp @@ -1592,6 +1592,7 @@ void RendererStorageRD::material_set_param(RID p_material, const StringName &p_p if (p_value.get_type() == Variant::NIL) { material->params.erase(p_param); } else { + ERR_FAIL_COND(p_value.get_type() == Variant::OBJECT); //object not allowed material->params[p_param] = p_value; } @@ -8324,6 +8325,9 @@ void RendererStorageRD::global_variable_set_override(const StringName &p_name, c if (!global_variables.variables.has(p_name)) { return; //variable may not exist } + + ERR_FAIL_COND(p_value.get_type() == Variant::OBJECT); + GlobalVariables::Variable &gv = global_variables.variables[p_name]; gv.override = p_value; diff --git a/servers/rendering/renderer_scene_cull.cpp b/servers/rendering/renderer_scene_cull.cpp index 84299b4ab2..271c039aad 100644 --- a/servers/rendering/renderer_scene_cull.cpp +++ b/servers/rendering/renderer_scene_cull.cpp @@ -1315,6 +1315,8 @@ void RendererSceneCull::instance_geometry_set_shader_parameter(RID p_instance, c Instance *instance = instance_owner.getornull(p_instance); ERR_FAIL_COND(!instance); + ERR_FAIL_COND(p_value.get_type() == Variant::OBJECT); + Map<StringName, Instance::InstanceShaderParameter>::Element *E = instance->instance_shader_parameters.find(p_parameter); if (!E) { |