Fixes error handling in GetAttachedShaders

TRAC #11846 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@139 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 8976c1e8
...@@ -1902,8 +1902,15 @@ void __stdcall glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* c ...@@ -1902,8 +1902,15 @@ void __stdcall glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* c
if (!programObject) if (!programObject)
{ {
if (context->getShader(program))
{
return error(GL_INVALID_OPERATION);
}
else
{
return error(GL_INVALID_VALUE); return error(GL_INVALID_VALUE);
} }
}
return programObject->getAttachedShaders(maxcount, count, shaders); return programObject->getAttachedShaders(maxcount, count, shaders);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment