If we can't compile our shaders, there's no point trying to link them.
Signed-off-by: Daniel Stone <daniels@collabora.com>
shader->vertex_shader =
compile_shader(GL_VERTEX_SHADER, 1, &vertex_source);
+ if (shader->vertex_shader == GL_NONE)
+ return -1;
if (renderer->fragment_shader_debug) {
sources[0] = fragment_source;
shader->fragment_shader =
compile_shader(GL_FRAGMENT_SHADER, count, sources);
+ if (shader->fragment_shader == GL_NONE)
+ return -1;
shader->program = glCreateProgram();
glAttachShader(shader->program, shader->vertex_shader);