mesa: protect against segfault in get_fp_input_mask()
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 7 Oct 2008 11:31:31 +0000 (12:31 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 7 Oct 2008 15:33:52 +0000 (16:33 +0100)
src/mesa/main/texenvprogram.c

index ea2ee160e4fedee4f0c26ea598995f5e90412d74..7049467c22feac268551f13e410c5bed9a32ea6e 100644 (file)
@@ -204,7 +204,10 @@ static GLuint get_fp_input_mask( GLcontext *ctx )
 {
    GLuint fp_inputs = 0;
 
-   if (!ctx->VertexProgram._Enabled) {
+   if (!ctx->VertexProgram._Enabled ||
+       !ctx->VertexProgram._Current) {
+
+      /* Fixed function logic */
       GLuint varying_inputs = ctx->varying_vp_inputs;
 
       /* First look at what values may be computed by the generated