From 42109817f209ded4bbb317b15d527f78d5dac79f Mon Sep 17 00:00:00 2001 From: Brad Grantham Date: Tue, 26 May 2020 23:30:48 -0700 Subject: [PATCH] only check EXIT_ON_OPENGL_ERROR on startup --- gl_utility.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gl_utility.cpp b/gl_utility.cpp index fe0690c..3e8b748 100644 --- a/gl_utility.cpp +++ b/gl_utility.cpp @@ -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;