From ae75ce279820c8c4ddc3013cbb6a8043e9d94d52 Mon Sep 17 00:00:00 2001 From: Aaron Culliney Date: Sat, 23 Apr 2016 11:51:02 -0700 Subject: [PATCH] Avoid calling glGetError() on thread without OpenGL context --- src/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index 00afacfa..95e9c540 100644 --- a/src/common.h +++ b/src/common.h @@ -93,7 +93,7 @@ // 2015/04/01 ... early calls to glGetError()--before a context exists--causes segfaults on MacOS X extern bool safe_to_do_opengl_logging; static inline GLenum safeGLGetError(void) { - if (safe_to_do_opengl_logging) { + if (safe_to_do_opengl_logging && video_isRenderThread()) { return glGetError(); } return (GLenum)0;