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:
Pierre-Eric Pelloux-Prayer
2025-06-25 11:38:21 +02:00
committed by Marge Bot
parent ac8dc19512
commit 613e9e9c23
+2 -1
View File
@@ -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);