mesa: check for null shader->Source
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 9 Jul 2008 21:54:21 +0000 (15:54 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 9 Jul 2008 21:54:21 +0000 (15:54 -0600)
src/mesa/shader/slang/slang_compile.c

index 4acbe802d2997094e3f86df9753a66d4e54fae29..ccb04494bf6bcbe141faf2f0b9f891a1be3628d0 100644 (file)
@@ -2167,6 +2167,9 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader)
       type = SLANG_UNIT_FRAGMENT_SHADER;
    }
 
+   if (!shader->Source)
+      return GL_FALSE;
+
    ctx->Shader.MemPool = _slang_new_mempool(1024*1024);
 
    /* XXX temporary hack */