Skip to content

Commit 753d263

Browse files
committed
fix: NPE when accepting war declarations, close #557
1 parent f276329 commit 753d263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/main/java/net/william278/husktowns/war/Declaration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static Declaration create(@NotNull Member sender, @NotNull Town defending
6363
}
6464

6565
public boolean hasExpired() {
66-
return OffsetDateTime.now().isAfter(expiryTime);
66+
return expiryTime != null && OffsetDateTime.now().isAfter(expiryTime);
6767
}
6868

6969
@NotNull

0 commit comments

Comments
 (0)