From: Keith Packard Date: Thu, 12 Oct 2017 07:29:07 +0000 (-0700) Subject: altoslib: Don't crash if there's no GPS coord to write KML X-Git-Tag: 1.8.3~1^2~71 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=e04679ba52761d5531037117a21ab1f1896358b0 altoslib: Don't crash if there's no GPS coord to write KML Just check for null before writing as a precaution. Signed-off-by: Keith Packard --- diff --git a/altoslib/AltosKML.java b/altoslib/AltosKML.java index 4738ac91..aa98f0e6 100644 --- a/altoslib/AltosKML.java +++ b/altoslib/AltosKML.java @@ -244,6 +244,8 @@ public class AltosKML implements AltosWriter { public void write(AltosGPS gps, double alt) { + if (gps == null) + return; if (gps.lat == AltosLib.MISSING) return; if (gps.lon == AltosLib.MISSING)