mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-12 00:38:44 +00:00
[Mobile] fix NPE
This commit is contained in:
@@ -93,6 +93,8 @@ public class NewGameMenu extends FPopupMenu {
|
||||
}
|
||||
|
||||
public static NewGameScreen getPreferredScreen() {
|
||||
if (preferredScreen == null) //shouldn't happen but we return constructed as default
|
||||
return NewGameScreen.Constructed;
|
||||
return preferredScreen;
|
||||
}
|
||||
public static void setPreferredScreen(NewGameScreen preferredScreen0) {
|
||||
|
||||
@@ -67,7 +67,7 @@ public class OnlineMenu extends FPopupMenu {
|
||||
private void initializeScreen() {
|
||||
if (screen == null) { //don't initialize screen until it's opened the first time
|
||||
try {
|
||||
screen = screenClass.newInstance();
|
||||
screen = screenClass.getConstructor().newInstance();
|
||||
screen.setHeaderCaption(Localizer.getInstance().getMessage("lblPlayOnline") + " - " + item.getText());
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user