From ca4d87878bb32c7d672ac00f41ca0292f19acfcb Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 8 Mar 2014 21:57:04 +0100 Subject: [PATCH 1/1] Use abort() on check_error() failure. This makes it much easier to trace them down in a debugger. --- util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.h b/util.h index cc82561..f62618c 100644 --- a/util.h +++ b/util.h @@ -48,7 +48,7 @@ void combine_two_samples(float w1, float w2, float *offset, float *total_weight, #ifdef NDEBUG #define check_error() #else -#define check_error() { int err = glGetError(); if (err != GL_NO_ERROR) { printf("GL error 0x%x at %s:%d\n", err, __FILE__, __LINE__); exit(1); } } +#define check_error() { int err = glGetError(); if (err != GL_NO_ERROR) { printf("GL error 0x%x at %s:%d\n", err, __FILE__, __LINE__); abort(); } } #endif // CHECK() is like assert(), but retains any side effects no matter the compilation mode. -- 2.39.2