altoslib: Check for null state.gps before accessing it in eeprom records
authorKeith Packard <keithp@keithp.com>
Tue, 16 Apr 2013 06:14:22 +0000 (23:14 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 16 Apr 2013 06:14:22 +0000 (23:14 -0700)
commiteba3aa949decacd5592472a3cda920aa6a06d96f
treeeba2fcbb13124da1bb51c6a34acb40254b50c0ae
parent58dd4b88fe738e005a13dfd69651853ea7f79205
altoslib: Check for null state.gps before accessing it in eeprom records

Used to be we'd set state.gps to garbage before seeing the first GPS
record; now we leave it null, which will cause crashes for code that
doesn't expect it. The code for reading and replaying eeprom data was
not checking and was nicely crashing as a result.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosEepromIterable.java