fixed on quit exception dialog
authorEdouard Tisserant
Sat, 12 May 2012 12:33:17 +0200
changeset 683 37882f34f9cb
parent 682 4d437bc0ef3f
child 684 f10449b18dbe
fixed on quit exception dialog
PLCOpenEditor.py
--- a/PLCOpenEditor.py	Wed May 09 00:39:08 2012 +0200
+++ b/PLCOpenEditor.py	Sat May 12 12:33:17 2012 +0200
@@ -1102,8 +1102,12 @@
     ## Call PLCOpenEditor refresh functions.
     #  @param elements List of elements to refresh.
     def _Refresh(self, *elements):
-        for element in elements:
-            self.RefreshFunctions[element]()
+        try:
+            for element in elements:
+                self.RefreshFunctions[element]()
+        except wx.PyDeadObjectError:
+            # ignore exceptions caused by refresh while quitting
+            pass
 
     ## Callback function when AUINotebook Page closed with CloseButton
     #  @param event AUINotebook Event.