diff options
author | Keith Packard <keithp@keithp.com> | 2019-09-25 13:09:22 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2019-09-25 13:09:22 -0700 |
commit | 35351c7db337c4384ef642fbc8b8676f0944686a (patch) | |
tree | 4420d5a01917ff86fbb27d521d16bb6737095245 /altoslib | |
parent | 4df77f2ac7f34986b8e7c0584c57d77dc74d9df9 (diff) |
altoslib: Don't crash when map flight data is missing
Just a couple of null pointer checks to allow the map display to come
up even when no data are available.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib')
-rw-r--r-- | altoslib/AltosMap.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/altoslib/AltosMap.java b/altoslib/AltosMap.java index 69142c37..8fc40e8a 100644 --- a/altoslib/AltosMap.java +++ b/altoslib/AltosMap.java @@ -499,6 +499,8 @@ public class AltosMap implements AltosMapTileListener, AltosMapStoreListener { notice_user_input(); if (path == null) return null; + if (transform == null) + return null; AltosLatLon at = transform.screen_lat_lon(new AltosPointInt(x, y)); return path.nearest(at); } |