summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-08-07 00:01:26 +0200
committeremkael <emkael@tlen.pl>2019-08-07 00:01:26 +0200
commit46a936418168504db10a5827aad6448c6893ccf9 (patch)
tree32b616db2cccffb02e013e1710e089ba67b96281 /jfr_playoff/gui
parent57c30dd98deded2692546647092c8f0b284c067c (diff)
"Fixing" TraceableText crashing on paste
Diffstat (limited to 'jfr_playoff/gui')
-rw-r--r--jfr_playoff/gui/frames/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/jfr_playoff/gui/frames/__init__.py b/jfr_playoff/gui/frames/__init__.py
index 3abdff5..a02791d 100644
--- a/jfr_playoff/gui/frames/__init__.py
+++ b/jfr_playoff/gui/frames/__init__.py
@@ -449,7 +449,11 @@ class TraceableText(tk.Text):
def _proxy(self, command, *args):
cmd = (self._orig, command) + args
- result = self.tk.call(cmd)
+ # https://stackoverflow.com/a/53418346 <- it's his fault.
+ try:
+ result = self.tk.call(cmd)
+ except:
+ return None
if command in ('insert', 'delete', 'replace') and \
not self._variableLock:
text = self.get('1.0', tk.END).strip()