renderer: check create_shader() finished

Fix found thanks to american fuzzy lop.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
macos/master
Marc-André Lureau 9 years ago committed by Dave Airlie
parent 1e67b391cc
commit 4f9a36367e
  1. 5
      src/vrend_renderer.c

@ -2023,6 +2023,11 @@ static int vrend_shader_create(struct vrend_context *ctx,
struct vrend_shader_key key)
{
if (!shader->sel->tokens) {
report_context_error(ctx, VIRGL_ERROR_CTX_ILLEGAL_SHADER, 0);
return -1;
}
shader->id = glCreateShader(conv_shader_type(shader->sel->type));
shader->compiled_fs_id = 0;
shader->glsl_prog = vrend_convert_shader(&ctx->shader_cfg, shader->sel->tokens, &key, &shader->sel->sinfo);

Loading…
Cancel
Save