Fix a few warnings

This commit is contained in:
Tim Angus 2014-08-30 17:29:09 +01:00
parent c621589157
commit 621a72e698
18 changed files with 76 additions and 74 deletions

View file

@ -927,7 +927,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;
@ -971,7 +971,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;
@ -1026,7 +1026,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;