From 586b73adf7d31cec86949560b78a64747568fff2 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 14 Nov 2018 10:57:43 -0300 Subject: [PATCH] Do not error on empty shader, just treat it as invalid by default. Fixes #15998. (cherry picked from commit 4d88721e625b300608f54b14e7dd150411e5497b) --- drivers/gles3/rasterizer_storage_gles3.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 2b8a0230a68..40380ff7967 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -1597,6 +1597,10 @@ void RasterizerStorageGLES3::_update_shader(Shader *p_shader) const { p_shader->uniforms.clear(); + if (p_shader->code == String()) { + return; //just invalid, but no error + } + ShaderCompilerGLES3::GeneratedCode gen_code; ShaderCompilerGLES3::IdentifierActions *actions = NULL;