diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 17:12:20 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-02 17:12:20 +0100 |
commit | cb1931b2715961dc663fa4e411850e4882722f14 (patch) | |
tree | 95405fb98f9780adcfe911241dfcdaeb5d4ca600 /drivers/gles3/shader_gles3.h | |
parent | eddaab17eaffeef3ad38612bf72a901fd0ffcde5 (diff) | |
parent | 2ec234ff67496c1410df2ab14c03e144889adc8d (diff) |
Merge pull request #67639 from clayjohn/GLES3-2d-shadows
Add 2D shadows and canvas SDF to OpenGL3 renderer
Diffstat (limited to 'drivers/gles3/shader_gles3.h')
-rw-r--r-- | drivers/gles3/shader_gles3.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gles3/shader_gles3.h b/drivers/gles3/shader_gles3.h index 760b5e5ddb..f5b4a8cb3c 100644 --- a/drivers/gles3/shader_gles3.h +++ b/drivers/gles3/shader_gles3.h @@ -208,8 +208,10 @@ protected: spec = version->variants[p_variant].lookup_ptr(specialization_default_mask); } - ERR_FAIL_COND(!spec); // Should never happen - ERR_FAIL_COND(!spec->ok); // Should never happen + if (!spec || !spec->ok) { + WARN_PRINT_ONCE("shader failed to compile, unable to bind shader."); + return; + } glUseProgram(spec->id); current_shader = spec; |