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:
commit
23a15ea9e1
|
@ -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