From c0e297c93d483d869281dc434cfbc1cd4dbe6786 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 26 Oct 2019 09:37:52 +0000 Subject: [PATCH] Don't try and generate vbos for surfaces with no verts nor elements. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5574 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_rsurf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/gl/gl_rsurf.c b/engine/gl/gl_rsurf.c index bbf89755f..c653102b7 100644 --- a/engine/gl/gl_rsurf.c +++ b/engine/gl/gl_rsurf.c @@ -78,7 +78,7 @@ static qboolean GL_BuildVBO(vbo_t *vbo, void *vdata, int vsize, void *edata, int int s; unsigned int vaostatic = 0; - if (!qglGenBuffersARB) + if (!qglGenBuffersARB || !vsize || !elementsize) return false; qglGenBuffersARB(1+(elementsize>0), vbos);