Fixed New version dialog error when no main window available

This commit is contained in:
Jindra Petřík
2021-11-29 17:15:56 +01:00
parent 44220860d5
commit 77a53a4267
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -2523,7 +2523,7 @@ public class Main {
if (!versions.isEmpty()) {
View.execInEventDispatch(() -> {
NewVersionDialog newVersionDialog = new NewVersionDialog(mainFrame.getWindow(), versions);
NewVersionDialog newVersionDialog = new NewVersionDialog(mainFrame == null ? null :mainFrame.getWindow(), versions);
newVersionDialog.setVisible(true);
Configuration.lastUpdatesCheckDate.set(Calendar.getInstance());
});