only check EXIT_ON_OPENGL_ERROR on startup

This commit is contained in:
Brad Grantham 2020-05-26 23:30:48 -07:00
parent ef922fa355
commit 42109817f2

View File

@ -15,8 +15,8 @@
void CheckOpenGL(const char *filename, int line) void CheckOpenGL(const char *filename, int line)
{ {
int glerr; int glerr;
bool stored_exit_flag = false; static bool stored_exit_flag = false;
bool exit_on_error; static bool exit_on_error;
if(!stored_exit_flag) { if(!stored_exit_flag) {
exit_on_error = getenv("EXIT_ON_OPENGL_ERROR") != NULL; exit_on_error = getenv("EXIT_ON_OPENGL_ERROR") != NULL;