From bdbe544c3b3b02c4b1a39ae082f0ba6443329da3 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sun, 9 Jul 2017 15:41:43 -0700 Subject: [PATCH] Avoid SIGSEGV if glCheckFramebufferStatus not available --- src/video/glvideo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/video/glvideo.c b/src/video/glvideo.c index 520535b2..7bd1a390 100644 --- a/src/video/glvideo.c +++ b/src/video/glvideo.c @@ -242,9 +242,11 @@ static void glvideo_init(void) { // Check for errors to make sure all of our setup went ok GL_ERRLOG("finished initialization"); - GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); - if (status != GL_FRAMEBUFFER_COMPLETE) { - ERRQUIT("framebuffer status: %04X", status); + if (glCheckFramebufferStatus != NULL) { + GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); + if (status != GL_FRAMEBUFFER_COMPLETE) { + ERRQUIT("framebuffer status: %04X", status); + } } }