Remove try/catch block that is not needed

This commit is contained in:
Kearwood Kip Gilbert
2019-07-11 14:24:17 -07:00
parent d7235734cd
commit 7a5debf358

View File

@@ -115,7 +115,7 @@ KRShader::KRShader(KRContext &context, char *szKey, std::string options, std::st
GLuint vertexShader = 0, fragShader = 0;
try {
const GLchar *vertSource[2] = {options.c_str(), vertShaderSource.c_str()};
const GLchar *fragSource[2] = {options.c_str(), fragShaderSource.c_str()};
@@ -207,21 +207,6 @@ KRShader::KRShader(KRContext &context, char *szKey, std::string options, std::st
}
}
} catch(...) {
if(vertexShader) {
GLDEBUG(glDeleteShader(vertexShader));
vertexShader = 0;
}
if(fragShader) {
GLDEBUG(glDeleteShader(fragShader));
fragShader = 0;
}
if(m_iProgram) {
GLDEBUG(glDeleteProgram(m_iProgram));
m_iProgram = 0;
}
}
// Release vertex and fragment shaders.
if (vertexShader) {
GLDEBUG(glDeleteShader(vertexShader));