Fixes a NullPointerException thrown when the profiles file does not exist
This commit is contained in:
parent
a5db6b3a70
commit
ba9b192790
@ -469,10 +469,9 @@ public class Profile implements java.io.Serializable {
|
|||||||
addProfile("Default");
|
addProfile("Default");
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException | NoSuchElementException e) {
|
} catch (FileNotFoundException | NoSuchElementException e) {
|
||||||
serverLauncherGui.showMessage("A profiles file was not found. Default profile was created.");
|
|
||||||
try {
|
try {
|
||||||
serverLauncherGui = new ServerLauncherGUI();
|
serverLauncherGui = new ServerLauncherGUI();
|
||||||
serverLauncherGui.showMessage("Failed to load ServerLauncherGUI messages. The ServerLauncherGUI can't be shown.");
|
serverLauncherGui.showMessage("A profiles file was not found. Default profile was created.");
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user