[Mesa-dev] [PATCH 2/2] freedreno: a2xx: fix crash when freeing context
Jonathan Marek
jonathan at marek.ca
Wed Jun 20 01:02:07 UTC 2018
Signed-off-by: Jonathan Marek <jonathan at marek.ca>
---
src/gallium/drivers/freedreno/a2xx/fd2_program.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.c b/src/gallium/drivers/freedreno/a2xx/fd2_program.c
index 9a77457251..834a7c7fcd 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_program.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_program.c
@@ -54,6 +54,8 @@ create_shader(enum shader_t type)
static void
delete_shader(struct fd2_shader_stateobj *so)
{
+ if (!so)
+ return;
ir2_shader_destroy(so->ir);
free(so->tokens);
free(so->bin);
--
2.17.1
More information about the mesa-dev
mailing list