summaryrefslogtreecommitdiff
path: root/src/renderergl1/tr_bsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl1/tr_bsp.c')
-rw-r--r--src/renderergl1/tr_bsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/renderergl1/tr_bsp.c b/src/renderergl1/tr_bsp.c
index bde7ad0c..dc695cce 100644
--- a/src/renderergl1/tr_bsp.c
+++ b/src/renderergl1/tr_bsp.c
@@ -928,7 +928,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;
@@ -972,7 +972,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;
@@ -1027,7 +1027,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;