mesa: move null ptr check (fdo bug 29843)

This commit is contained in:
Brian Paul
2010-08-27 14:35:52 -06:00
parent f57df7f213
commit 9ce0d92ae7
+2 -2
View File
@@ -104,9 +104,9 @@ _mesa_new_shader(GLcontext *ctx, GLuint name, GLenum type)
assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER ||
type == GL_GEOMETRY_SHADER_ARB);
shader = talloc_zero(NULL, struct gl_shader);
shader->Type = type;
shader->Name = name;
if (shader) {
shader->Type = type;
shader->Name = name;
_mesa_init_shader(ctx, shader);
}
return shader;