On Wed, Mar 12, 2014 at 2:11 PM, Juha-Pekka Heikkila
<juhapekka.heikk...@gmail.com> wrote:
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com>
> ---
>  src/glsl/link_varyings.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
> index c925c00..226f012 100644
> --- a/src/glsl/link_varyings.cpp
> +++ b/src/glsl/link_varyings.cpp
> @@ -290,7 +290,8 @@ tfeedback_decl::init(struct gl_context *ctx, const void 
> *mem_ctx,
>      * is converted from a float[8] to a vec4[2].
>      */
>     if (ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX].LowerClipDistance &&
> -       strcmp(this->var_name, "gl_ClipDistance") == 0) {
> +           this->var_name != NULL &&
> +           strcmp(this->var_name, "gl_ClipDistance") == 0) {
>        this->is_clip_distance_mesa = true;
>     }
>  }
> --
> 1.8.1.2

Huh. I don't know what the right thing to do if ralloc_strndup fails here.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to