fix traceback when closing a window
This commit is contained in:
parent
9d5c2a6bb3
commit
32be225258
|
@ -1226,7 +1226,11 @@ class Terminal(Gtk.VBox):
|
||||||
def ensure_visible_and_focussed(self):
|
def ensure_visible_and_focussed(self):
|
||||||
"""Make sure that we're visible and focussed"""
|
"""Make sure that we're visible and focussed"""
|
||||||
window = self.get_toplevel()
|
window = self.get_toplevel()
|
||||||
|
try:
|
||||||
topchild = window.get_children()[0]
|
topchild = window.get_children()[0]
|
||||||
|
except IndexError:
|
||||||
|
dbg('unable to get top child')
|
||||||
|
return
|
||||||
maker = Factory()
|
maker = Factory()
|
||||||
|
|
||||||
if maker.isinstance(topchild, 'Notebook'):
|
if maker.isinstance(topchild, 'Notebook'):
|
||||||
|
|
Loading…
Reference in New Issue