summaryrefslogtreecommitdiff
path: root/src/renderergl1
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl1')
-rw-r--r--src/renderergl1/tr_bsp.c6
-rw-r--r--src/renderergl1/tr_shader.c2
2 files changed, 4 insertions, 4 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;
diff --git a/src/renderergl1/tr_shader.c b/src/renderergl1/tr_shader.c
index 1408902d..f84d02c6 100644
--- a/src/renderergl1/tr_shader.c
+++ b/src/renderergl1/tr_shader.c
@@ -2916,7 +2916,7 @@ a single large text block that can be scanned for shader names
static void ScanAndLoadShaderFiles( void )
{
char **shaderFiles;
- char *buffers[MAX_SHADER_FILES];
+ char *buffers[MAX_SHADER_FILES] = {0};
char *p;
int numShaderFiles;
int i;