From 35351c7db337c4384ef642fbc8b8676f0944686a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 25 Sep 2019 13:09:22 -0700 Subject: 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 --- altoslib/AltosMap.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'altoslib') 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); } -- cgit v1.2.3