From 24306c0b2783bde3e1545d10effefa13d58667c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 24 May 2017 18:17:38 +0200 Subject: [PATCH] radeonsi: fix a crash in si_destroy_context if we fail early MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeonsi/si_pipe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.30.2