Skip to content

Commit

Permalink
Merge pull request #112 from mattrose/fix-closewindow-1
Browse files Browse the repository at this point in the history
fix traceback when closing a window
  • Loading branch information
mattrose authored Jun 11, 2020
2 parents a762bb9 + 32be225 commit 3e73e89
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion terminatorlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,11 @@ def grab_focus(self):
def ensure_visible_and_focussed(self):
"""Make sure that we're visible and focussed"""
window = self.get_toplevel()
topchild = window.get_children()[0]
try:
topchild = window.get_children()[0]
except IndexError:
dbg('unable to get top child')
return
maker = Factory()

if maker.isinstance(topchild, 'Notebook'):
Expand Down

0 comments on commit 3e73e89

Please sign in to comment.