From: Jonathan Marek Date: Thu, 21 Jun 2018 21:06:29 +0000 (-0400) Subject: freedreno: a2xx: fix crash when freeing context X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dd8553dd9543a27720c39be64692190f36c81683;p=mesa.git freedreno: a2xx: fix crash when freeing context Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.c b/src/gallium/drivers/freedreno/a2xx/fd2_program.c index 9a774572514..834a7c7fcd7 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);