summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-09-03 17:31:58 -0600
committerKeith Packard <keithp@keithp.com>2013-09-03 17:31:58 -0600
commit7d3af3d74f70a0933829be91ad3e3be04b1f1023 (patch)
tree0aca55b5e266a40e52bc6efd22975a0179d5c22e
parent528e2e41112cad8a81bccbb89c3bd202b818a506 (diff)
altoslib: Ensure eeprom file body always exists
Create an empty list of body elements if none were read from the file Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altoslib/AltosEepromFile.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/altoslib/AltosEepromFile.java b/altoslib/AltosEepromFile.java
index 367b6791..082c23ca 100644
--- a/altoslib/AltosEepromFile.java
+++ b/altoslib/AltosEepromFile.java
@@ -91,6 +91,9 @@ public class AltosEepromFile extends AltosStateIterable {
case AltosLib.AO_LOG_FORMAT_EASYMINI:
body = new AltosEepromIterable(AltosEepromMini.read(input));
break;
+ default:
+ body = new AltosEepromIterable(new LinkedList<AltosEeprom>());
+ break;
}
/* Find boost tick */