This commit is contained in:
Johannes Mockenhaupt 2017-12-20 21:14:35 +01:00
parent 3b43e4d06a
commit cf9d55747e
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -241,7 +241,7 @@ public class RuffyScripter implements RuffyCommands {
List<String> violations = cmd.validateArguments(); List<String> violations = cmd.validateArguments();
if (!violations.isEmpty()) { if (!violations.isEmpty()) {
log.error("Command argument violations: " + Joiner.on(", ").join(violations)); log.error("Command argument violations: " + Joiner.on(", ").join(violations));
return new CommandResult().success(false).state(readPumpStateInternal()); return new CommandResult().success(false).state(new PumpState());
} }
synchronized (RuffyScripter.class) { synchronized (RuffyScripter.class) {
@ -423,7 +423,7 @@ public class RuffyScripter implements RuffyCommands {
private PumpState recoverFromCommandFailure() { private PumpState recoverFromCommandFailure() {
Menu menu = this.currentMenu; Menu menu = this.currentMenu;
if (menu == null) { if (menu == null) {
return null; return new PumpState();
} }
MenuType type = menu.getType(); MenuType type = menu.getType();
if (type != MenuType.WARNING_OR_ERROR && type != MenuType.MAIN_MENU) { if (type != MenuType.WARNING_OR_ERROR && type != MenuType.MAIN_MENU) {