From: Steinar H. Gunderson Date: Sat, 8 Mar 2014 20:57:04 +0000 (+0100) Subject: Use abort() on check_error() failure. X-Git-Tag: 1.0~43 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=ca4d87878bb32c7d672ac00f41ca0292f19acfcb Use abort() on check_error() failure. This makes it much easier to trace them down in a debugger. --- 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.