Avoid calling glGetError() on thread without OpenGL context

This commit is contained in:
Aaron Culliney 2016-04-23 11:51:02 -07:00
parent 98e5c883f9
commit ae75ce2798

View File

@ -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;