Skip to content

Commit b1c35af

Browse files
committed
CRender: Fix shader_compile() error handling.
1 parent 6fc370d commit b1c35af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Layers/xrRenderPC_GL/rgl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ HRESULT CRender::shader_compile(
923923
CHK_GL(glDetachShader(program, shader));
924924
CHK_GL(glGetProgramiv(program, GL_LINK_STATUS, (GLint*)&status));
925925

926-
if (status == GL_TRUE)
926+
if (status == GL_FALSE)
927927
{
928928
GLint length;
929929
CHK_GL(glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length));
@@ -944,7 +944,10 @@ HRESULT CRender::shader_compile(
944944
Log("! ", name);
945945
if (_pErrorMsgs)
946946
Log("! error: ", _pErrorMsgs);
947+
948+
return S_FALSE;
947949
}
948950

949951
CHK_GL(glDeleteShader(shader));
952+
return S_OK;
950953
}

0 commit comments

Comments
 (0)