fix shader destroy id unset

This commit is contained in:
vaxerski 2022-12-03 14:45:05 +00:00
parent fbc839e8d9
commit 056a45d035

View file

@ -15,10 +15,10 @@ GLint CShader::getUniformLocation(const std::string& unif) {
CShader::~CShader() { CShader::~CShader() {
// destroy shader // destroy shader
destroy(); destroy();
program = 0;
} }
void CShader::destroy() { void CShader::destroy() {
glDeleteProgram(program); glDeleteProgram(program);
program = 0;
} }