summaryrefslogtreecommitdiff
path: root/drivers/gles3/shader_gles3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/shader_gles3.cpp')
-rw-r--r--drivers/gles3/shader_gles3.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index 2a3b8a9b91..799179e8d4 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -122,6 +122,11 @@ bool ShaderGLES3::bind() {
ERR_FAIL_COND_V(!version, false);
+ if (!version->ok) { //broken, unable to bind (do not throw error, you saw it before already when it failed compilation).
+ glUseProgram(0);
+ return false;
+ }
+
glUseProgram(version->id);
DEBUG_TEST_ERROR("Use Program");