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 @@ def get_location(self, term, x, y): 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):