Skip to content

Commit

Permalink
no more NullPointerException pls
Browse files Browse the repository at this point in the history
  • Loading branch information
Yazawazi committed Apr 22, 2022
1 parent 1c6aa32 commit cb043e0
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/java/emu/grasscutter/game/avatar/GenshinAvatar.java
Original file line number Diff line number Diff line change
Expand Up @@ -705,12 +705,14 @@ public AvatarInfo toProto() {
.setExpLevel(10)
.setExpNumber(6325); // Highest Level

for (int i = 0; i < this.getFetterList().size(); i++) {
avatarFetter.addFetterList(
FetterData.newBuilder()
.setFetterId(this.getFetterList().get(i))
.setFetterState(FetterState.FINISH.getValue())
);
if (this.getFetterList() != null) {
for (int i = 0; i < this.getFetterList().size(); i++) {
avatarFetter.addFetterList(
FetterData.newBuilder()
.setFetterId(this.getFetterList().get(i))
.setFetterState(FetterState.FINISH.getValue())
);
}
}

AvatarInfo.Builder avatarInfo = AvatarInfo.newBuilder()
Expand Down

0 comments on commit cb043e0

Please sign in to comment.