Skip to content

Commit

Permalink
fixed nullpointer crash
Browse files Browse the repository at this point in the history
  • Loading branch information
garretreichenbach committed Apr 30, 2024
1 parent 6212c1a commit 5abaf7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/smlauncher/StarMadeLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
public class StarMadeLauncher extends JFrame {

public static final String BUG_REPORT_URL = "https://github.com/garretreichenbach/New-StarMade-Launcher/issues";
public static final String LAUNCHER_VERSION = "3.0.14";
public static final String LAUNCHER_VERSION = "3.0.15";
private static final String[] J18ARGS = {"--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED", "--add-exports=java.base/sun.nio.ch=ALL-UNNAMED", "--add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED", "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", "--add-opens=jdk.compiler/com.sun.tools.javac=ALL-UNNAMED", "--add-opens=java.base/sun.nio.ch=ALL-UNNAMED", "--add-opens=java.base/java.lang=ALL-UNNAMED", "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED", "--add-opens=java.base/java.io=ALL-UNNAMED", "--add-opens=java.base/java.util=ALL-UNNAMED"};
private static IndexFileEntry gameVersion;
private static GameBranch lastUsedBranch = GameBranch.RELEASE;
Expand Down Expand Up @@ -193,6 +193,7 @@ private static void startup() {
updateDialog.setVisible(true);
} else startLauncherFrame();
} catch(Exception e) {
e.printStackTrace();
System.out.println("Error occurred while running launcher");
}
});
Expand Down Expand Up @@ -1254,7 +1255,7 @@ private void onSelectVersion(JComboBox<String> versionDropdown) {
selectedVersion = versionDropdown.getItemAt(versionDropdown.getSelectedIndex()).split(" ")[0];
LaunchSettings.setLastUsedVersion(selectedVersion);
LaunchSettings.saveSettings();
recreateButtons(playPanel, false);
if(playPanel != null) recreateButtons(playPanel, false);
}

private void updateGame(IndexFileEntry version) {
Expand Down
4 changes: 4 additions & 0 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
{
"version": "3.0.14",
"versionDate": "2024-4-25"
},
{
"version": "3.0.15",
"versionDate": "2024-4-29"
}
]
}

0 comments on commit 5abaf7d

Please sign in to comment.