Removes an internal error report if shader fails compile

This commit is contained in:
Yuri Roubinsky 2021-08-12 10:07:02 +03:00
parent e2ca1d413e
commit 63c7d5c330
2 changed files with 6 additions and 3 deletions

View file

@ -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();

View file

@ -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);