diff options
author | Kai Wasserbäch <[email protected]> | 2015-08-14 14:49:43 +0200 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-08-21 09:23:52 +1000 |
commit | 6921f170b62d9f9c0e5bd2cb6666c15395addba8 (patch) | |
tree | b71b3a717e10da64eaafb6a23fcc34f69dbe4647 /src/glsl/lower_subroutine.cpp | |
parent | 3e6adbd761f72b612aba57fd86bb5203aae07133 (diff) |
glsl: check if return_deref in lower_subroutine_visitor::visit_leave isn't NULL
Fixes a crash in Piglit's
spec@arb_shader_subroutine@[email protected] for me.
Signed-off-by: Kai Wasserbäch <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/glsl/lower_subroutine.cpp')
-rw-r--r-- | src/glsl/lower_subroutine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/lower_subroutine.cpp b/src/glsl/lower_subroutine.cpp index b29912ad150..c1aed61a36a 100644 --- a/src/glsl/lower_subroutine.cpp +++ b/src/glsl/lower_subroutine.cpp @@ -98,7 +98,7 @@ lower_subroutine_visitor::visit_leave(ir_call *ir) else last_branch = if_tree(equal(subr_to_int(var), lc), new_call, last_branch); - if (s > 0) + if (return_deref && s > 0) return_deref = return_deref->clone(mem_ctx, NULL); } if (last_branch) |