mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-11-25 06:40:38 +01:00
Fixed missing check for none value
This commit is contained in:
parent
c39b7ac148
commit
6120c1dd31
@ -814,7 +814,7 @@ class Location(Sensor):
|
||||
if slat != None and slon != None:
|
||||
s = relative_to.sensors["location"]
|
||||
d = s.data
|
||||
if "latitude" in d and "longitude" in d and "altitude" in d:
|
||||
if d != None and "latitude" in d and "longitude" in d and "altitude" in d:
|
||||
lat = d["latitude"]; lon = d["longitude"]; alt = d["altitude"]
|
||||
if lat != None and lon != None:
|
||||
if alt == None: alt = 0
|
||||
|
Loading…
Reference in New Issue
Block a user