diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 5ca15be07d3..633b0ba6e7b 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -168,8 +168,10 @@ dri2_create_context_attribs(struct glx_screen *base, goto error_exit; /* Check the renderType value */ - if (!validate_renderType_against_config(config_base, dca.render_type)) - goto error_exit; + if (!validate_renderType_against_config(config_base, dca.render_type)) { + *error = BadValue; + goto error_exit; + } if (shareList) { /* We can't share with an indirect context */ diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index bab21854e35..bd871e81193 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -219,8 +219,10 @@ dri3_create_context_attribs(struct glx_screen *base, goto error_exit; /* Check the renderType value */ - if (!validate_renderType_against_config(config_base, dca.render_type)) - goto error_exit; + if (!validate_renderType_against_config(config_base, dca.render_type)) { + *error = BadValue; + goto error_exit; + } if (shareList) { /* We can't share with an indirect context */ diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index cd004741f03..9b67a1a871f 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -576,7 +576,8 @@ drisw_create_context_attribs(struct glx_screen *base, /* Check the renderType value */ if (!validate_renderType_against_config(config_base, dca.render_type)) { - return NULL; + *error = BadValue; + return NULL; } if (shareList) {