OSDN Git Service

glsl/ast: don't crash when func_name is NULL
authorDave Airlie <airlied@redhat.com>
Tue, 3 May 2016 04:39:06 +0000 (14:39 +1000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 14 Jun 2016 14:48:37 +0000 (15:48 +0100)
commit09f48203c540f6eacf4580b168b575c77478272f
tree485add7462d02c9425be0df66dcffa9140cabf23
parent997bcc45ecdc5046e60b43975b4fc22a55dbe46b
glsl/ast: don't crash when func_name is NULL

This fixes a crash in
GL43-CTS.shader_subroutine.subroutines_not_allowed_as_variables_constructors_and_argument_or_return_types

If we can't find the func_name in one of these paths,
we have emitted an earlier error so just return here.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 6702c1581092bce230742d02ebf9325f68bd247a)
src/compiler/glsl/ast_function.cpp