From f25532db78127efd58df34a98d735fc6f9345ad2 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 3 May 2019 20:48:51 +0200 Subject: [PATCH] glgsg: properly handle shader compilation failure Fixes #645 --- panda/src/glstuff/glShaderContext_src.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 5a7eda65fc..200e39004d 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -3206,6 +3206,10 @@ glsl_compile_and_link() { valid &= glsl_compile_shader(Shader::ST_compute); } + if (!valid) { + return false; + } + // There might be warnings, so report those. GLSLShaders::const_iterator // it; for (it = _glsl_shaders.begin(); it != _glsl_shaders.end(); ++it) { // glsl_report_shader_errors(*it); }