[Mesa-dev] [PATCH] glsl: Fix (and validate) comment above glsl_type::name.

Kenneth Graunke kenneth at whitecape.org
Wed Apr 10 13:32:15 PDT 2013


On 04/09/2013 09:01 PM, Paul Berry wrote:
> The comment above glsl_type::name claimed that it could sometimes be
> NULL.  This was wrong--it is never NULL.  Many error handling paths
> would segfault if it were.
>
> Fix the comment and add assertions to validate that it really is never
> NULL.
> ---
>   src/glsl/glsl_types.cpp | 4 ++++
>   src/glsl/glsl_types.h   | 3 +--
>   2 files changed, 5 insertions(+), 2 deletions(-)

I could've sworn I've actually seen it be NULL for anonymous structures. 
  What do those use?  ""?



More information about the mesa-dev mailing list