summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/renderergl2/tr_surface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/renderergl2/tr_surface.c b/src/renderergl2/tr_surface.c
index f4451eb8..b74ba369 100644
--- a/src/renderergl2/tr_surface.c
+++ b/src/renderergl2/tr_surface.c
@@ -430,14 +430,13 @@ static qboolean RB_SurfaceVao(vao_t *vao, int numVerts, int numIndexes, int firs
firstIndexOffset = BUFFER_OFFSET(firstIndex * sizeof(glIndex_t));
lastIndexOffset = BUFFER_OFFSET((firstIndex + numIndexes) * sizeof(glIndex_t));
- if (r_mergeMultidraws->integer)
+ if (tess.multiDrawPrimitives && r_mergeMultidraws->integer)
{
i = 0;
if (r_mergeMultidraws->integer == 1)
{
// lazy merge, only check the last primitive
- // harmless if no multidraw primitives (i = -1 < 0)
i = tess.multiDrawPrimitives - 1;
}