# HG changeset patch # User Edouard Tisserant # Date 1366796040 -32400 # Node ID b0ac30ba7eaf20d30e4497a0f97c309a07ac2c7b # Parent fa7c5034c1d2f987870909ab9993962f4f93e819 Fixed error when stopping PLC with wxglade HMI diff -r fa7c5034c1d2 -r b0ac30ba7eaf wxglade_hmi/wxglade_hmi.py --- 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"))