Remove try/catch block that is not needed
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user