summaryrefslogtreecommitdiff
path: root/drivers/gles3/shader_gles3.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/shader_gles3.h')
-rw-r--r--drivers/gles3/shader_gles3.h6
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;