diff options
author | Brian Paul <[email protected]> | 2014-09-09 09:56:47 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-09-11 08:22:55 -0600 |
commit | a46d7579e9b92a48e391ef63be7129a957bf155a (patch) | |
tree | 0620d0a2a479c2936f9dd05e3882e3fc8e5fc1b1 /src/mesa/main/context.c | |
parent | f976b4c1bf2271cf986be8204147ae986380cc91 (diff) |
st/mesa: handle failed context creation for core profile
If the glx/wgl state tracker requested a core profile but the gallium
driver did not support some feature of GL 3.1 or later, we were setting
ctx->Version=0 and then failing the assertion in
_mesa_initialize_exec_table().
With this change we check for ctx->Version=0 and tear down the context
and return NULL from st_create_context().
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 8208a50b3e6..4c2c32e7b7a 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1507,7 +1507,10 @@ handle_first_current(struct gl_context *ctx) GLenum buffer; GLint bufferIndex; - assert(ctx->Version > 0); + if (ctx->Version == 0) { + /* probably in the process of tearing down the context */ + return; + } ctx->Extensions.String = _mesa_make_extension_string(ctx); |