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 /altosuilib/AltosUIGraph.java | |
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 'altosuilib/AltosUIGraph.java')
-rw-r--r-- | altosuilib/AltosUIGraph.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/altosuilib/AltosUIGraph.java b/altosuilib/AltosUIGraph.java index 098e9a52..da024513 100644 --- a/altosuilib/AltosUIGraph.java +++ b/altosuilib/AltosUIGraph.java @@ -137,7 +137,8 @@ public class AltosUIGraph implements AltosUnitsListener, AltosShapeListener { this.series = null; this.axis_index = 0; - enable.register_shape_listener(this); + if (enable != null) + enable.register_shape_listener(this); axes_added = new Hashtable<Integer,Boolean>(); |