diff --git a/.pick_status.json b/.pick_status.json index 2c3d91ee41d..328ceb6c042 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -859,7 +859,7 @@ "description": "radeonsi: Check aux_context on si_destroy_screen()", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index a8fbc6c0f48..6196f2158d0 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -842,14 +842,16 @@ static void si_destroy_screen(struct pipe_screen *pscreen) simple_mtx_destroy(&sscreen->aux_context_lock); - struct u_log_context *aux_log = ((struct si_context *)sscreen->aux_context)->log; - if (aux_log) { - sscreen->aux_context->set_log_context(sscreen->aux_context, NULL); - u_log_context_destroy(aux_log); - FREE(aux_log); - } + if (sscreen->aux_context) { + struct u_log_context *aux_log = ((struct si_context *)sscreen->aux_context)->log; + if (aux_log) { + sscreen->aux_context->set_log_context(sscreen->aux_context, NULL); + u_log_context_destroy(aux_log); + FREE(aux_log); + } - sscreen->aux_context->destroy(sscreen->aux_context); + sscreen->aux_context->destroy(sscreen->aux_context); + } util_queue_destroy(&sscreen->shader_compiler_queue); util_queue_destroy(&sscreen->shader_compiler_queue_low_priority);