From db48b6eaad07bd74e71b76a27c354a6276656820 Mon Sep 17 00:00:00 2001
From: Athanasius <github@miggy.org>
Date: Mon, 22 Mar 2021 14:18:00 +0000
Subject: [PATCH] plugins/edsm: Avoid Tk event_generate() calls during shutdown

# Conflicts:
#	plugins/edsm.py
---
 plugins/edsm.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/plugins/edsm.py b/plugins/edsm.py
index c0bfd5aa..1707ae3d 100644
--- a/plugins/edsm.py
+++ b/plugins/edsm.py
@@ -622,9 +622,8 @@ def worker() -> None:
                             if not closing and e['event'] in ('StartUp', 'Location', 'FSDJump', 'CarrierJump'):
                                 # Update main window's system status
                                 this.lastlookup = r
-
+                                # calls update_status in main thread
                                 if not config.shutting_down:
-                                    # calls update_status in main thread
                                     this.system_link.event_generate('<<EDSMStatus>>', when="tail")
 
                             if r['msgnum'] // 100 != 1: