diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-08-12 10:07:02 +0300 |
---|---|---|
committer | Yuri Roubinsky <chaosus89@gmail.com> | 2021-08-12 10:18:18 +0300 |
commit | 63c7d5c330fa805a9db900a4ed365a8a1338fefc (patch) | |
tree | 8e30319d4b535996109c068436dc7434e785f697 /servers/rendering | |
parent | e2ca1d413e6c52edbf9ce70a50032f7b63b56677 (diff) |
Removes an internal error report if shader fails compile
Diffstat (limited to 'servers/rendering')
-rw-r--r-- | servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp | 5 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/shader_rd.h | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp index 333e87bdbd..89d14e871a 100644 --- a/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp +++ b/servers/rendering/renderer_rd/forward_clustered/scene_shader_forward_clustered.cpp @@ -131,8 +131,9 @@ void SceneShaderForwardClustered::ShaderData::set_code(const String &p_code) { SceneShaderForwardClustered *shader_singleton = (SceneShaderForwardClustered *)SceneShaderForwardClustered::singleton; Error err = shader_singleton->compiler.compile(RS::SHADER_SPATIAL, code, &actions, path, gen_code); - - ERR_FAIL_COND(err != OK); + if (err != OK) { + return; + } if (version.is_null()) { version = shader_singleton->shader.version_create(); diff --git a/servers/rendering/renderer_rd/shader_rd.h b/servers/rendering/renderer_rd/shader_rd.h index 529328f0ed..44705b2bd6 100644 --- a/servers/rendering/renderer_rd/shader_rd.h +++ b/servers/rendering/renderer_rd/shader_rd.h @@ -142,7 +142,9 @@ public: ERR_FAIL_COND_V(!variants_enabled[p_variant], RID()); Version *version = version_owner.getornull(p_version); - ERR_FAIL_COND_V(!version, RID()); + if (!version) { + return RID(); + } if (version->dirty) { _compile_version(version); |