Fix: TaskWindow causes NullPointerException.

This commit is contained in:
huanghongxun
2015-09-07 13:00:54 +08:00
parent 6e003a7364
commit 01526546b1
3 changed files with 12 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ import java.awt.Font;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.ParseException;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.jackhuang.hellominecraft.HMCLog;
@@ -29,6 +30,7 @@ import org.jackhuang.hellominecraft.utils.UpdateChecker;
import org.jackhuang.hellominecraft.svrmgr.views.MainWindow;
import org.jackhuang.hellominecraft.utils.VersionNumber;
import org.jackhuang.hellominecraft.lookandfeel.HelloMinecraftLookAndFeel;
import org.jackhuang.hellominecraft.utils.system.MessageBox;
/**
*
@@ -53,8 +55,8 @@ public class Main {
} catch (ParseException | UnsupportedLookAndFeelException ex) {
HMCLog.warn("Failed to set look and feel", ex);
}
new UpdateChecker(new VersionNumber(firstVer, secondVer, thirdVer), "hmcsm", SettingsManager.settings.checkUpdate, () -> {
SettingsManager.settings.checkUpdate = false;
new UpdateChecker(new VersionNumber(firstVer, secondVer, thirdVer), "hmcsm", () -> {
SwingUtilities.invokeLater(() -> MessageBox.Show("发现更新!"));
}).start();
new MainWindow().setVisible(true);
} catch (Throwable t) {