From fed287334a5d620da9a18c5a92e50981e6456f91 Mon Sep 17 00:00:00 2001 From: Eric Blade Date: Mon, 11 Oct 2010 18:40:58 -0400 Subject: [PATCH] further fixing in WinTables for dealing with a window that has disappeared --- pyfpdb/WinTables.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyfpdb/WinTables.py b/pyfpdb/WinTables.py index 80d1a9b5..391f70c7 100644 --- a/pyfpdb/WinTables.py +++ b/pyfpdb/WinTables.py @@ -97,7 +97,10 @@ class Table(Table_Window): return None def get_window_title(self): - return win32gui.GetWindowText(self.window) + try: # after window is destroyed, self.window = attribute error + return win32gui.GetWindowText(self.window) + except AttributeError: + return "" # def get_nt_exe(self, hwnd): # """Finds the name of the executable that the given window handle belongs to."""