From 914c73d5aa2d87d55bcc10b3bf5cfd4d4f6a8f93 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 19 Jul 2019 12:05:18 +0200 Subject: "Handling" of some GUI errors that occur during file load/unload and component attach/detach --- jfr_playoff/gui/frames/visual.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'jfr_playoff/gui/frames/visual.py') diff --git a/jfr_playoff/gui/frames/visual.py b/jfr_playoff/gui/frames/visual.py index 3e09445..6780e99 100644 --- a/jfr_playoff/gui/frames/visual.py +++ b/jfr_playoff/gui/frames/visual.py @@ -190,7 +190,11 @@ class MatchList(RefreshableOptionMenu): return match.label def getValues(self): - return self.winfo_toplevel().getMatches() + try: + return self.winfo_toplevel().getMatches() + except tk.TclError: + # we're probably being destroyed, ignore + return [] def getVarValue(self, match): return unicode(match.getMatchID()) -- cgit v1.2.3