Skip to content

Commit

Permalink
CRender: Fix shader_compile() error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Nov 23, 2015
1 parent 6fc370d commit b1c35af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Layers/xrRenderPC_GL/rgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ HRESULT CRender::shader_compile(
CHK_GL(glDetachShader(program, shader));
CHK_GL(glGetProgramiv(program, GL_LINK_STATUS, (GLint*)&status));

if (status == GL_TRUE)
if (status == GL_FALSE)
{
GLint length;
CHK_GL(glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length));
Expand All @@ -944,7 +944,10 @@ HRESULT CRender::shader_compile(
Log("! ", name);
if (_pErrorMsgs)
Log("! error: ", _pErrorMsgs);

return S_FALSE;
}

CHK_GL(glDeleteShader(shader));
return S_OK;
}

0 comments on commit b1c35af

Please sign in to comment.