From 6019323740c7082b0fd75b7344f3e8e938ce66db Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Thu, 31 Aug 2017 11:17:59 +0200 Subject: [PATCH] Work around curentMenu being null, maybe. (cherry picked from commit da49be0) --- .../main/java/de/jotomo/ruffyscripter/RuffyScripter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index 953ade2414..7230b5668c 100644 --- a/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/app/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -464,6 +464,12 @@ public class RuffyScripter { // === pump ops === public Menu getCurrentMenu() { + // TODO workaround, supposedly fixed in latest ruffy? + while (currentMenu == null) { + log.error("currentMenu == null, waiting"); + SystemClock.sleep(500); + waitForMenuUpdate(); + } return currentMenu; }