Possible crash fix

This commit is contained in:
Anuken
2025-12-17 14:54:23 -05:00
parent a552908d76
commit 6986bcbf90

View File

@@ -169,7 +169,7 @@ public class FloorRenderer{
//loop through all layers, and add layer index if it exists
for(int i = 0; i < layers; i++){
if(chunk[i] != null && i != CacheLayer.walls.id && chunk[i].bounds.overlaps(bounds)){
if(i < chunk.length && chunk[i] != null && i != CacheLayer.walls.id && chunk[i].bounds.overlaps(bounds)){
drawnLayerSet.add(i);
}
}