delete both shaders on failure

This commit is contained in:
FunkyFr3sh 2018-05-13 19:43:03 +02:00
parent fd4a893729
commit 51d499758d
2 changed files with 3 additions and 2 deletions

View file

@ -182,7 +182,10 @@ GLuint OpenGL_BuildProgram(const GLchar *vertSource, const GLchar *fragSource)
if (isCompiled == GL_FALSE)
{
if (glDeleteShader)
{
glDeleteShader(fragShader);
glDeleteShader(vertShader);
}
return 0;
}