Mesa (master): radeonsi: fix a crash in si_destroy_context if we fail early
Marek Olšák
mareko at kemper.freedesktop.org
Sun May 28 23:52:42 UTC 2017
Module: Mesa
Branch: master
Commit: 24306c0b2783bde3e1545d10effefa13d58667c4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=24306c0b2783bde3e1545d10effefa13d58667c4
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed May 24 18:17:38 2017 +0200
radeonsi: fix a crash in si_destroy_context if we fail early
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
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 909a959bc1..de4e5da0e0 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);
More information about the mesa-commit
mailing list