Skip to content

Commit b7fd076

Browse files
Ryanf55peterbarker
authored andcommitted
Fix no master if requesting home
1 parent 594d661 commit b7fd076

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

MAVProxy/modules/mavproxy_wp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def get_WP0(self, home_only=False):
241241
this ideally should be home, but if home is not available then use a click position
242242
'''
243243
(lat, lon, alt) = (None, None, None)
244-
if 'HOME_POSITION' in self.master.messages:
244+
if self.master is not None and 'HOME_POSITION' in self.master.messages:
245245
h = self.master.messages['HOME_POSITION']
246246
(lat, lon, alt) = (h.latitude*1.0e-7, h.longitude*1.0e-7, h.altitude*1.0e-3)
247247
elif home_only:

0 commit comments

Comments
 (0)