radeonsi: check set_debug_callback before use
The callback might not be installed yet if si_create_context fails
early.
Fixes: 59a3f38ff6 ("radeonsi: clear the debug callback on ctx destroy")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35733>
This commit is contained in:
committed by
Marge Bot
parent
ac8dc19512
commit
613e9e9c23
@@ -193,7 +193,8 @@ static void si_destroy_context(struct pipe_context *context)
|
||||
{
|
||||
struct si_context *sctx = (struct si_context *)context;
|
||||
|
||||
context->set_debug_callback(context, NULL);
|
||||
if (context->set_debug_callback)
|
||||
context->set_debug_callback(context, NULL);
|
||||
|
||||
util_unreference_framebuffer_state(&sctx->framebuffer.state);
|
||||
util_framebuffer_init(context, NULL, sctx->framebuffer.fb_cbufs, &sctx->framebuffer.fb_zsbuf);
|
||||
|
||||
Reference in New Issue
Block a user