Geography: Avoid crash is OsmGps not initialized

This commit is contained in:
SNoiraud 2016-08-03 14:32:16 +02:00
parent 30050d403d
commit e7e46cb067

View File

@ -227,6 +227,7 @@ class GeoGraphyView(OsmGps, NavigationView):
NavigationView.change_page(self)
self.uistate.clear_filter_results()
self.end_selection = None
if self.osm:
self.osm.grab_focus()
self.set_crosshair(config.get("geography.show_cross"))
@ -271,6 +272,7 @@ class GeoGraphyView(OsmGps, NavigationView):
if self.active:
self.bookmarks.redraw()
self.build_tree()
if self.osm:
self.osm.grab_focus()
self.set_crosshair(config.get("geography.show_cross"))
@ -610,6 +612,8 @@ class GeoGraphyView(OsmGps, NavigationView):
"""
Create all markers for the specified person.
"""
if self.marker_layer is None:
return
self.remove_all_markers()
self.remove_all_gps()
self.remove_all_tracks()