summaryrefslogtreecommitdiff
path: root/src/mesa/shader/slang/slang_compile.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-07-09 15:54:21 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-07-09 15:54:21 -0600
commit64f92e00c8292113f9a6372959febe903af09db6 (patch)
tree7fb5f19017350883139ea2557dbc4d1abd124014 /src/mesa/shader/slang/slang_compile.c
parent811a183a274048158af5f5a05c4d3106dcffd08b (diff)
mesa: check for null shader->Source
Diffstat (limited to 'src/mesa/shader/slang/slang_compile.c')
-rw-r--r--src/mesa/shader/slang/slang_compile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 4acbe802d2..ccb04494bf 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -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 */