altoslib: Don't crash when map flight data is missing
[fw/altos] / altoslib / AltosMap.java
index 69142c375c3656bf37b1c75a3d80a260dd994b40..8fc40e8af307057a269e2552271ed09f0a47d060 100644 (file)
@@ -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);
        }