about summary refs log tree commit diff
path: root/src/engine/client/gfx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/client/gfx.c')
-rw-r--r--src/engine/client/gfx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/engine/client/gfx.c b/src/engine/client/gfx.c
index 13c35a39..fe72f4c7 100644
--- a/src/engine/client/gfx.c
+++ b/src/engine/client/gfx.c
@@ -531,9 +531,14 @@ int gfx_load_texture_raw(int w, int h, int format, const void *data)
 	unsigned char *texdata = (unsigned char *)data;
 	unsigned char *tmpdata = 0;
 	int oglformat = 0;
+	int tex = 0;
+	
+	/* don't waste memory on texture if we are stress testing */
+	if(config.stress)
+		return -1;
 	
 	/* grab texture */
-	int tex = first_free_texture;
+	tex = first_free_texture;
 	first_free_texture = textures[tex].next;
 	textures[tex].next = -1;