When I (deliberately) terminate my program, it exits with a SIGSEGV fault. This occurs only when I run the debug build though, the release build exits just fine. When I used the debugger, the fault occured on line 95 in Texture.cpp.
Texture::~Texture()
{
// Destroy the OpenGL texture
if (m_texture)
{
ensureGlContext();
GLuint texture = static_cast<GLuint>(m_texture);
glCheck(glDeleteTextures(1, &texture)); //line 95
}
}
I only use ONE texture in my program and it is not dynamically allocated so I don't see what I'm doing wrong here...