wxglade_hmi/wxglade_hmi.py
changeset 1053 b0ac30ba7eaf
parent 1014 e2f7d6c95db0
child 1062 fd7c9a7cf882
--- a/wxglade_hmi/wxglade_hmi.py	Wed Apr 24 17:21:20 2013 +0900
+++ b/wxglade_hmi/wxglade_hmi.py	Wed Apr 24 18:34:00 2013 +0900
@@ -95,7 +95,7 @@
     %(name)s.Show()
 """ % {"name": x[0], "class": x[1]},
                              hmi_frames.items())),
-       "cleanup": "\n    ".join(map(lambda x:"%s.Destroy()" % x, hmi_frames.keys()))})
+       "cleanup": "\n    ".join(map(lambda x:"if %s is not None: %s.Destroy()" % (x,x), hmi_frames.keys()))})
         runtimefile.close()
         
         return [], "", False, ("runtime_%s.py"%location_str, file(runtimefile_path,"rb"))