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)
{
int glerr;
bool stored_exit_flag = false;
bool exit_on_error;
static bool stored_exit_flag = false;
static bool exit_on_error;
if(!stored_exit_flag) {
exit_on_error = getenv("EXIT_ON_OPENGL_ERROR") != NULL;