glsl: Fix null return coverity warning
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 28 Sep 2015 10:59:34 +0000 (12:59 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Tue, 29 Sep 2015 08:53:08 +0000 (10:53 +0200)
commit1dc2db7a4dfb0e88a51a27c2234b6a01dead80bf
tree85bc6613989f6b2dd0b06642a6c3fb54d75709d0
parent6bf718fec22f605702c7d15503d4dbc3c2be35e6
glsl: Fix null return coverity warning

Add an assert on the result of as_dereference() not being NULL:

>>>     CID 1324978:  Null pointer dereferences  (NULL_RETURNS)
>>>     Dereferencing a null pointer "deref_record->record->as_dereference()".

Since we are introducing a new variable to hold the result of
as_dereference(), take the opportunity to rename deref_record_type to
interface_type and just name the new variable interface_deref, which is
less confusing.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/glsl/lower_ubo_reference.cpp