From 1c3b0a2722ef2c78acdd872a5aaa441df3273516 Mon Sep 17 00:00:00 2001 From: sk89q Date: Wed, 8 Jan 2014 15:20:51 -0800 Subject: [PATCH] Fixed issue with update button always appearing. --- .../java/com/skcraft/launcher/dialog/LauncherFrame.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/skcraft/launcher/dialog/LauncherFrame.java b/src/main/java/com/skcraft/launcher/dialog/LauncherFrame.java index eb14c6e..acb8c02 100644 --- a/src/main/java/com/skcraft/launcher/dialog/LauncherFrame.java +++ b/src/main/java/com/skcraft/launcher/dialog/LauncherFrame.java @@ -167,12 +167,14 @@ public class LauncherFrame extends JFrame { } private void checkLauncherUpdate() { - ListenableFuture future = launcher.getExecutor().submit(new LauncherUpdateChecker(launcher)); + ListenableFuture future = launcher.getExecutor().submit(new LauncherUpdateChecker(launcher)); Futures.addCallback(future, new FutureCallback() { @Override public void onSuccess(URL result) { - requestUpdate(result); + if (result != null) { + requestUpdate(result); + } } @Override @@ -208,7 +210,6 @@ public class LauncherFrame extends JFrame { ProgressDialog.showProgress(this, future, _("launcher.selfUpdatingTitle"), _("launcher.selfUpdatingStatus")); SwingHelper.addErrorDialogCallback(this, future); - } else { selfUpdateButton.setVisible(false); }