summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_bsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl2/tr_bsp.c')
-rw-r--r--src/renderergl2/tr_bsp.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/renderergl2/tr_bsp.c b/src/renderergl2/tr_bsp.c
index e1a86331..57fee661 100644
--- a/src/renderergl2/tr_bsp.c
+++ b/src/renderergl2/tr_bsp.c
@@ -600,9 +600,7 @@ static void R_LoadVisibility( lump_t *l ) {
int len;
byte *buf;
- len = ( s_worldData.numClusters + 63 ) & ~63;
-
- len = l->filelen;
+ len = l->filelen;
if ( !len ) {
return;
}
@@ -1474,7 +1472,7 @@ int R_StitchPatches( int grid1num, int grid2num ) {
for (m = 0; m < 2; m++) {
- if ( grid2->width >= MAX_GRID_SIZE )
+ if ( !grid2 || grid2->width >= MAX_GRID_SIZE )
break;
if (m) offset2 = (grid2->height-1) * grid2->width;
else offset2 = 0;
@@ -1518,7 +1516,7 @@ int R_StitchPatches( int grid1num, int grid2num ) {
}
for (m = 0; m < 2; m++) {
- if (grid2->height >= MAX_GRID_SIZE)
+ if (!grid2 || grid2->height >= MAX_GRID_SIZE)
break;
if (m) offset2 = grid2->width-1;
else offset2 = 0;
@@ -1573,7 +1571,7 @@ int R_StitchPatches( int grid1num, int grid2num ) {
for (k = grid1->height-1; k > 1; k -= 2) {
for (m = 0; m < 2; m++) {
- if ( grid2->width >= MAX_GRID_SIZE )
+ if (!grid2 || grid2->width >= MAX_GRID_SIZE )
break;
if (m) offset2 = (grid2->height-1) * grid2->width;
else offset2 = 0;