mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-10 14:26:45 +00:00
Fix 500 internal error when autologin option is not specified in the config
This commit is contained in:
parent
5de909cd9c
commit
bbaa338469
@ -15,7 +15,7 @@ public class PlayPage implements TemplateViewRoute {
|
||||
public ModelAndView handle(Request request, Response response) {
|
||||
|
||||
String autoLogin = GameServer.INSTANCE.getConfig().getString("autologin");
|
||||
if (!autoLogin.equals("")) {
|
||||
if (autoLogin != null && !autoLogin.equals("")) {
|
||||
AlertMessage[] messages = {new AlertMessage("Logged in as " + autoLogin, AlertType.SUCCESS)};
|
||||
request.session().attribute("messages", messages);
|
||||
request.session().attribute("username", autoLogin);
|
||||
|
Loading…
x
Reference in New Issue
Block a user