[Mesa-dev] [PATCH 10/13] glsl: add missing null check in tfeedback_decl::init()
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Wed Mar 12 14:11:52 PDT 2014
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at 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
More information about the mesa-dev
mailing list