Fixes error handling in LinkProgram

TRAC #11821 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@136 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 8e6a6be8
......@@ -2950,7 +2950,14 @@ void __stdcall glLinkProgram(GLuint program)
if (!programObject)
{
return error(GL_INVALID_VALUE);
if (context->getShader(program))
{
return error(GL_INVALID_OPERATION);
}
else
{
return error(GL_INVALID_VALUE);
}
}
programObject->link();
......
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