Fix NPE.
This commit is contained in:
parent
3b43e4d06a
commit
cf9d55747e
1 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue