Merge pull request #112 from mattrose/fix-closewindow-1
fix traceback when closing a window
This commit is contained in:
commit
3e73e89765
|
@ -1230,7 +1230,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()
|
||||||
topchild = window.get_children()[0]
|
try:
|
||||||
|
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