Skip to content

Commit 8dc5c82

Browse files
committed
Fix crash if a cubemap is missing a side
1 parent 6b4dc8b commit 8dc5c82

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

neo/renderer/Image_files.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,9 @@ bool R_LoadCubeImages( const char *imgName, cubeFiles_t extensions, byte *pics[6
10071007
if ( pics ) {
10081008
for ( j = 0 ; j < i ; j++ ) {
10091009
R_StaticFree( pics[j] );
1010+
// DG: this lets ActuallyLoadImage() print a warning and load
1011+
// a default texture instead of crash later
1012+
pics[j] = NULL;
10101013
}
10111014
}
10121015

0 commit comments

Comments
 (0)