mirror of
https://github.com/Anuken/Mindustry.git
synced 2024-12-22 23:04:00 +07:00
Fixed rare pathfinder crash
This commit is contained in:
parent
344a843692
commit
a8fe74b880
@ -1158,7 +1158,11 @@ public class ControlPathfinder implements Runnable{
|
||||
|
||||
Tile tileOn = unit.tileOn(), initialTileOn = tileOn;
|
||||
//TODO: should fields be accessible from this thread?
|
||||
FieldCache fieldCache = fields.get(fieldKey);
|
||||
FieldCache fieldCache = null;
|
||||
try{
|
||||
fieldCache = fields.get(fieldKey);
|
||||
}catch(ArrayIndexOutOfBoundsException ignored){ //TODO fix this, rare crash due to remove() elsewhere
|
||||
}
|
||||
if(fieldCache == null) fieldCache = request.oldCache;
|
||||
|
||||
if(fieldCache != null && tileOn != null){
|
||||
|
Loading…
Reference in New Issue
Block a user