From: Marek Olšák Date: Wed, 24 May 2017 16:17:38 +0000 (+0200) Subject: radeonsi: fix a crash in si_destroy_context if we fail early X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=24306c0b2783bde3e1545d10effefa13d58667c4;p=mesa.git radeonsi: fix a crash in si_destroy_context if we fail early Reviewed-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 909a959bc1c..de4e5da0e03 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -45,7 +45,8 @@ static void si_destroy_context(struct pipe_context *context) * properly. */ struct pipe_framebuffer_state fb = {}; - context->set_framebuffer_state(context, &fb); + if (context->set_framebuffer_state) + context->set_framebuffer_state(context, &fb); si_release_all_descriptors(sctx);