From 32be225258e78db88c9d137b483c9616318f95a1 Mon Sep 17 00:00:00 2001 From: Matt Rose Date: Tue, 2 Jun 2020 15:46:15 -0400 Subject: [PATCH] fix traceback when closing a window --- terminatorlib/terminal.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index dfaf14cf..66aab674 100644 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -1226,7 +1226,11 @@ class Terminal(Gtk.VBox): 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'):