diff --git a/code/renderergl1/tr_bsp.c b/code/renderergl1/tr_bsp.c index ff623ad9..1e660f28 100644 --- a/code/renderergl1/tr_bsp.c +++ b/code/renderergl1/tr_bsp.c @@ -1070,7 +1070,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; diff --git a/code/renderergl1/tr_model_iqm.c b/code/renderergl1/tr_model_iqm.c index 0f99f160..6c47ed07 100644 --- a/code/renderergl1/tr_model_iqm.c +++ b/code/renderergl1/tr_model_iqm.c @@ -144,7 +144,7 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na unsigned short *framedata; char *str; int i, j; - float jointInvMats[IQM_MAX_JOINTS * 12]; + float jointInvMats[IQM_MAX_JOINTS * 12] = {0.0f}; float *mat, *matInv; size_t size, joint_names; iqmData_t *iqmData; diff --git a/code/renderergl1/tr_shade_calc.c b/code/renderergl1/tr_shade_calc.c index e8f43e4f..ae33c7fb 100644 --- a/code/renderergl1/tr_shade_calc.c +++ b/code/renderergl1/tr_shade_calc.c @@ -771,7 +771,7 @@ void RB_CalcModulateAlphasByFog( unsigned char *colors ) { */ void RB_CalcModulateRGBAsByFog( unsigned char *colors ) { int i; - float texCoords[SHADER_MAX_VERTEXES][2]; + float texCoords[SHADER_MAX_VERTEXES][2] = {{0.0f}}; // calculate texcoords so we can derive density // this is not wasted, because it would only have