diff --git a/Tank/src/TanksGenericStorage.java b/Tank/src/TanksGenericStorage.java index 7b03c24..a6760e6 100644 --- a/Tank/src/TanksGenericStorage.java +++ b/Tank/src/TanksGenericStorage.java @@ -33,7 +33,9 @@ public class TanksGenericStorage { for (DrawingArmoVehicle elem: _tankStorages.get(key).getTanks(100)) { if(_tankStorages.get(key) == null) return false; - data.append(elem != null ? ExtentionDrawingTank.GetDataForSave(elem, _separatorForObjectWR) + "\n" : ""); + + if(_tankStorages.get(key) != null) + data.append(elem != null ? ExtentionDrawingTank.GetDataForSave(elem, _separatorForObjectWR) + "\n" : ""); } if(data.length() == 0)