Skip to content

Commit

Permalink
Fix memory leak in OpenGL
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyLoaderr committed May 8, 2018
1 parent 6eacc19 commit afeef72
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Layers/xrRenderPC_GL/rgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1371,12 +1371,15 @@ HRESULT CRender::shader_compile(
Log(shaderSrc);
Log("Shader source end.");
}
xr_free(shaderSrc);
#endif

xr_free(_pErrorMsgs);
CHK_GL(glDeleteShader(shader));
return E_FAIL;
}

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

0 comments on commit afeef72

Please sign in to comment.