Skip to content

Commit

Permalink
Merge pull request #388 from TheBigS/bugfix-vte-racecondition
Browse files Browse the repository at this point in the history
Fixed race condition when calling grab_focus after underlying vte could be closed
  • Loading branch information
mattrose authored Feb 20, 2021
2 parents ee8c51d + 9143fb4 commit 23a15ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terminatorlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 23a15ea

Please sign in to comment.