Merge pull request #388 from TheBigS/bugfix-vte-racecondition

Fixed race condition when calling grab_focus after underlying vte could be closed
This commit is contained in:
Matt Rose 2021-02-19 20:56:07 -05:00 committed by GitHub
commit 23a15ea9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1244,7 +1244,7 @@ class Terminal(Gtk.VBox):
def grab_focus(self): def grab_focus(self):
"""Steal focus for this terminal""" """Steal focus for this terminal"""
if not self.vte.has_focus(): if self.vte and not self.vte.has_focus():
self.vte.grab_focus() self.vte.grab_focus()
def ensure_visible_and_focussed(self): def ensure_visible_and_focussed(self):