Fixed race condition when calling grab_focus after underlying vte could be closed
This commit is contained in:
parent
ee8c51d10e
commit
9143fb4b51
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user