diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index 69aa33bc44..7fb389d8b9 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -347,16 +347,11 @@ public class RuffyScripter { public PumpAlert readDisplayPumpAlert() { Object errorObj = currentMenu.getAttribute(MenuAttribute.ERROR); - Object errorMsgObj = currentMenu.getAttribute(MenuAttribute.MESSAGE); while (errorObj == null) { SystemClock.sleep(10); errorObj = currentMenu.getAttribute(MenuAttribute.ERROR); - errorMsgObj = currentMenu.getAttribute(MenuAttribute.MESSAGE); } - while (errorMsgObj == null) { - SystemClock.sleep(10); - errorMsgObj = currentMenu.getAttribute(MenuAttribute.MESSAGE); - } - return new PumpAlert((int) errorObj, (String) errorMsgObj); + String errorMsg = (String) currentMenu.getAttribute(MenuAttribute.MESSAGE); + return new PumpAlert((int) errorObj, errorMsg); } }