Fixed race condition when calling grab_focus after underlying vte could be closed

This commit is contained in:
thebigs 2021-02-18 22:21:40 -05:00
parent ee8c51d10e
commit 9143fb4b51

View File

@ -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):