summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_program.c2
1 files changed, 2 insertions, 0 deletions
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);