glsl: Fix forward NULL dereference coverity warning
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 28 Sep 2015 10:59:35 +0000 (12:59 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Tue, 29 Sep 2015 08:53:08 +0000 (10:53 +0200)
commit12d510ab742baad88d624585938c723ffedbcae7
tree5ec3b35141b85702111d3bc11a2c30d4be77ba03
parent1dc2db7a4dfb0e88a51a27c2234b6a01dead80bf
glsl: Fix forward NULL dereference coverity warning

The comment says that it should be impossible for decl_type to be NULL
here, so don't try to handle the case where it is, simply add an assert.

>>>     CID 1324977:  Null pointer dereferences  (FORWARD_NULL)
>>>     Comparing "decl_type" to null implies that "decl_type" might be null.

No piglit regressions observed.

Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
src/glsl/ast_to_hir.cpp