Commit db039cc3 authored by zhaodice's avatar zhaodice Committed by GitHub
Browse files

make sure towerData is not null (#1240)

* make sure towerData is not null

* Update Player.java

* add notice
parent eb170bcb
......@@ -191,6 +191,7 @@ public class Player {
this.nameCardList = new HashSet<>();
this.flyCloakList = new HashSet<>();
this.costumeList = new HashSet<>();
this.towerData = new TowerData();
this.unlockedForgingBlueprints = new HashSet<>();
this.activeForges = new ArrayList<>();
......@@ -483,6 +484,10 @@ public class Player {
}
public TowerData getTowerData() {
if(towerData==null){
// because of mistake, null may be saved as storage at some machine, this if can be removed in future
towerData = new TowerData();
}
return towerData;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment