shithub: tinygl

Download patch

ref: 5848b7033edb889a521b27fb6dfbfdd0371d18d4
parent: 8c11951859d170b62b8198625bc62fefbe87c2b7
author: David <gek@katherine>
date: Fri Feb 19 09:20:50 EST 2021

Cost free error checks

--- a/src/list.c
+++ b/src/list.c
@@ -71,8 +71,8 @@
 #include "error_check.h"
 
 #else
-//if(!l || !ob) //Do no error checks!
-//	gl_fatal_error("GL_OUT_OF_MEMORY");
+if(!l || !ob)
+	gl_fatal_error("GL_OUT_OF_MEMORY");
 #endif
 	ob->next = NULL;
 	l->first_op_buffer = ob;
@@ -129,7 +129,7 @@
 #define ERROR_FLAG GL_OUT_OF_MEMORY
 #include "error_check.h"
 #else
-	{}//gl_fatal_error("GL_OUT_OF_MEMORY");
+	gl_fatal_error("GL_OUT_OF_MEMORY");
 #endif
 		ob1->next = NULL;
 
@@ -227,7 +227,7 @@
 #define ERROR_FLAG GL_OUT_OF_MEMORY
 #include "error_check.h"
 #else
-	//if(l==NULL) gl_fatal_error("Could not find or allocate list.");
+	if(l==NULL) gl_fatal_error("Could not find or allocate list.");
 #endif
 	c->current_op_buffer = l->first_op_buffer;
 	c->current_op_buffer_index = 0;