Always define app.source, don't restore nonexistent source
This commit is contained in:
parent
400c537e6d
commit
52987e95fb
|
@ -65,6 +65,8 @@ class SatelliteApp(Gtk.Application):
|
|||
self.app_menu)
|
||||
self.menu_popover.set_position(Gtk.PositionType.BOTTOM)
|
||||
|
||||
self.source = None
|
||||
|
||||
self.infolabel.set_markup("<tt>" + "\n"*10 + "</tt>")
|
||||
|
||||
self.dataframe = DataFrame()
|
||||
|
@ -186,7 +188,8 @@ class SatelliteApp(Gtk.Application):
|
|||
"""Called after main loop exits."""
|
||||
print("Cleaning up...")
|
||||
self.gpx_write()
|
||||
self.source.restore()
|
||||
if self.source is not None:
|
||||
self.source.restore()
|
||||
print("...done.")
|
||||
|
||||
def sigint_handler(self):
|
||||
|
|
Loading…
Reference in a new issue