GL/Program: Don't delete nonexistant shaders (when using binaries)

This commit is contained in:
Connor McLaughlin 2020-10-10 18:26:29 +10:00
parent 13a9411b07
commit 9e2e1050bb
1 changed files with 4 additions and 2 deletions

View File

@ -199,9 +199,11 @@ bool Program::Link()
{
glLinkProgram(m_program_id);
glDeleteShader(m_vertex_shader_id);
if (m_vertex_shader_id != 0)
glDeleteShader(m_vertex_shader_id);
m_vertex_shader_id = 0;
glDeleteShader(m_fragment_shader_id);
if (m_fragment_shader_id != 0)
glDeleteShader(m_fragment_shader_id);
m_fragment_shader_id = 0;
GLint status = GL_FALSE;