summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaders.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-03 16:02:05 -0600
committerBrian Paul <[email protected]>2008-07-03 16:02:05 -0600
commit011185396b1bb13fcba6619912948bbd2154936d (patch)
tree3cc7aa25773ba6802f151d83c7a632a744bdab97 /src/mesa/main/shaders.c
parent3dc6591a7c85b6a05551ce91b69e57d23148bf57 (diff)
mesa: fix some error codes in _mesa_ShaderSourceARB()
Diffstat (limited to 'src/mesa/main/shaders.c')
-rw-r--r--src/mesa/main/shaders.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index 7bf88087670..b7b2f791a52 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.1
*
- * Copyright (C) 2004-2007 Brian Paul All Rights Reserved.
+ * Copyright (C) 2004-2008 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -382,7 +382,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
GLsizei i, totalLength;
GLcharARB *source;
- if (string == NULL) {
+ if (!shaderObj || string == NULL) {
_mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB");
return;
}
@@ -400,7 +400,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
for (i = 0; i < count; i++) {
if (string[i] == NULL) {
_mesa_free((GLvoid *) offsets);
- _mesa_error(ctx, GL_INVALID_VALUE, "glShaderSourceARB(null string)");
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glShaderSourceARB(null string)");
return;
}
if (length == NULL || length[i] < 0)