Handle get_first_notebook_page() failing. Closes LP #354495

This commit is contained in:
Chris Jones 2009-06-16 18:26:16 +01:00
parent 2aaba264af
commit 46b73f406a
1 changed files with 4 additions and 1 deletions

View File

@ -1299,7 +1299,10 @@ class Terminator:
def move_tab(self, term, direction): def move_tab(self, term, direction):
dbg("moving to direction %s" % direction) dbg("moving to direction %s" % direction)
(notebook, page) = self.get_first_notebook_page(term) data = self.get_first_notebook_page(term)
if data is None:
return False
(notebook, page) = data
page_num = notebook.page_num(page) page_num = notebook.page_num(page)
nbpages = notebook.get_n_pages() nbpages = notebook.get_n_pages()
#dbg ("%s %s %s %s" % (page_num, nbpages,notebook, page)) #dbg ("%s %s %s %s" % (page_num, nbpages,notebook, page))