From 77f5f7adc126e22109e8200a66304727cabde977 Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 28 Jul 2022 02:16:59 +0000 Subject: [PATCH] Fix a gl buffer handle leak. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6290 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_rsurf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/gl/gl_rsurf.c b/engine/gl/gl_rsurf.c index e43f1c88e..b4367a53e 100644 --- a/engine/gl/gl_rsurf.c +++ b/engine/gl/gl_rsurf.c @@ -53,12 +53,12 @@ void GLBE_ClearVBO(vbo_t *vbo, qboolean dataonly) { if (!vboh[i]) continue; - for (j = 0; j < 7; j++) + for (j = 0; j < i; j++) { if (vboh[j] == vboh[i]) break; //already freed by one of the other ones } - if (j == 7) + if (j == i) qglDeleteBuffersARB(1, &vboh[i]); } if (vbo->vertdata)