Avoid SIGSEGV if glCheckFramebufferStatus not available

This commit is contained in:
Aaron Culliney 2017-07-09 15:41:43 -07:00
parent 13bf93e5ca
commit bdbe544c3b

View File

@ -242,11 +242,13 @@ static void glvideo_init(void) {
// Check for errors to make sure all of our setup went ok
GL_ERRLOG("finished initialization");
if (glCheckFramebufferStatus != NULL) {
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) {
ERRQUIT("framebuffer status: %04X", status);
}
}
}
static void glvideo_shutdown(void) {
LOG("BEGIN ...");