From 277b7142ed6a45f1067f36a472df3c28231bf5ef Mon Sep 17 00:00:00 2001 From: "daniel@transgaming.com" Date: Tue, 13 Apr 2010 03:26:44 +0000 Subject: [PATCH] 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 --- src/libGLESv2/libGLESv2.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libGLESv2/libGLESv2.cpp b/src/libGLESv2/libGLESv2.cpp index 799cedf0d..9433bb203 100644 --- a/src/libGLESv2/libGLESv2.cpp +++ b/src/libGLESv2/libGLESv2.cpp @@ -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();