diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.c | 7 | ||||
-rw-r--r-- | src/mesa/main/context.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 7300d2f3c46..2c3d9a11ce3 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1310,7 +1310,7 @@ fail: * \sa _mesa_initialize_context() and init_attrib_groups(). */ void -_mesa_free_context_data( struct gl_context *ctx ) +_mesa_free_context_data(struct gl_context *ctx, bool destroy_compiler_types) { if (!_mesa_get_current_context()){ /* No current context, but we may need one in order to delete @@ -1385,7 +1385,8 @@ _mesa_free_context_data( struct gl_context *ctx ) free(ctx->VersionString); - _mesa_destroy_shader_compiler_types(); + if (destroy_compiler_types) + _mesa_destroy_shader_compiler_types(); /* unbind the context if it's currently bound */ if (ctx == _mesa_get_current_context()) { @@ -1405,7 +1406,7 @@ void _mesa_destroy_context( struct gl_context *ctx ) { if (ctx) { - _mesa_free_context_data(ctx); + _mesa_free_context_data(ctx, true); free( (void *) ctx ); } } diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 7de10e9924b..e9b270df14c 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -115,7 +115,7 @@ _mesa_initialize_context( struct gl_context *ctx, const struct dd_function_table *driverFunctions); extern void -_mesa_free_context_data( struct gl_context *ctx ); +_mesa_free_context_data(struct gl_context *ctx, bool destroy_compiler_types); extern void _mesa_destroy_context( struct gl_context *ctx ); |