From 9143fb4b5102c396f09d62fc392593b8b3b2d0c8 Mon Sep 17 00:00:00 2001 From: thebigs Date: Thu, 18 Feb 2021 22:21:40 -0500 Subject: [PATCH] Fixed race condition when calling grab_focus after underlying vte could be closed --- terminatorlib/terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index da49338c..4715e86c 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1244,7 +1244,7 @@ class Terminal(Gtk.VBox): def grab_focus(self): """Steal focus for this terminal""" - if not self.vte.has_focus(): + if self.vte and not self.vte.has_focus(): self.vte.grab_focus() def ensure_visible_and_focussed(self):