mirror of
https://github.com/SKCraft/Launcher.git
synced 2024-11-27 12:46:22 +01:00
GH-440 Fix NPE generated by config dialog when no runtime is configured
This commit is contained in:
parent
d1184c32b2
commit
932ef97be6
@ -81,8 +81,8 @@ public class ConfigurationDialog extends JDialog {
|
||||
DefaultComboBoxModel<JavaRuntime> model = new DefaultComboBoxModel<>(javaRuntimes);
|
||||
|
||||
// Put the runtime from the config in the model if it isn't
|
||||
boolean configRuntimeFound = Arrays.stream(javaRuntimes).anyMatch(r -> config.getJavaRuntime().equals(r));
|
||||
if (!configRuntimeFound) {
|
||||
boolean configRuntimeFound = Arrays.stream(javaRuntimes).anyMatch(r -> r.equals(config.getJavaRuntime()));
|
||||
if (!configRuntimeFound && config.getJavaRuntime() != null) {
|
||||
model.insertElementAt(config.getJavaRuntime(), 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user