check for AttributeError at new window_foreign_new call

This commit is contained in:
Eric Blade 2010-11-26 18:51:25 -05:00
parent c40312b98b
commit bfa3cfc20c

View File

@ -138,7 +138,10 @@ class Table_Window(object):
self.search_string = getTableTitleRe(self.config, self.site, self.type, **table_kwargs)
self.find_table_parameters()
try:
self.gdkhandle = gtk.gdk.window_foreign_new(self.number)
except AttributeError: # self.number does not exist, table was closed
return None
geo = self.get_geometry()
if geo is None: return None
self.width = geo['width']