prevent a traceback which happen with obscure reasons. Fixes #5366

This commit is contained in:
Yann Leboulanger 2009-10-28 20:03:45 +01:00
parent 8ddd6a298b
commit d6f4241102
1 changed files with 3 additions and 0 deletions

View File

@ -764,6 +764,9 @@ class MessageWindow(object):
old_ctrl.set_control_active(False)
new_ctrl = self._widget_to_control(notebook.get_nth_page(page_num))
if not new_ctrl:
# This event is sometimes exposed without any reason. see #5366
return
new_ctrl.set_control_active(True)
self.show_title(control = new_ctrl)