Skip to content

Commit

Permalink
Application: Fix NPE in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Jul 28, 2024
1 parent 355db0f commit 38524c9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public boolean isComplete() {

private void updateLastChecked() {
LocalDateTime lastCheck = UpdateService.getInstance().getSettings().lastCheck;
lastUpdateCheckLabel.setText("Last checked: " + DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT).format(lastCheck));
DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT);
lastUpdateCheckLabel.setText("Last checked: " + (lastCheck != null ? formatter.format(lastCheck) : "N/A"));
}
}

0 comments on commit 38524c9

Please sign in to comment.