Corrects error handling in GetUniformLocation

TRAC #11845 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@140 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 23953e3e
...@@ -2617,7 +2617,14 @@ int __stdcall glGetUniformLocation(GLuint program, const GLchar* name) ...@@ -2617,7 +2617,14 @@ int __stdcall glGetUniformLocation(GLuint program, const GLchar* name)
if (!programObject) if (!programObject)
{ {
return error(GL_INVALID_VALUE, -1); if (context->getShader(program))
{
return error(GL_INVALID_OPERATION, -1);
}
else
{
return error(GL_INVALID_VALUE, -1);
}
} }
if (!programObject->isLinked()) if (!programObject->isLinked())
......
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