fix second error message in case of error appearing too early to have a wx frame
authorEdouard Tisserant 7BB06627 <edouard.tisserant@gmail.com>
Mon, 16 Jan 2017 01:19:58 +0100
changeset 1634 299a1dde6baa
parent 1633 f629a91b456d
child 1638 3f86e9768f14
fix second error message in case of error appearing too early to have a wx frame
ProjectController.py
--- a/ProjectController.py	Mon Jan 16 01:14:57 2017 +0100
+++ b/ProjectController.py	Mon Jan 16 01:19:58 2017 +0100
@@ -1262,7 +1262,7 @@
     def _UpdateButtons(self):
         self.EnableMethod("_Clean", os.path.exists(self._getBuildPath()))
         self.ShowMethod("_showIECcode", os.path.isfile(self._getIECcodepath()))
-        if not self.UpdateMethodsFromPLCStatus():
+        if self.AppFrame is not None and not self.UpdateMethodsFromPLCStatus():
             self.AppFrame.RefreshStatusToolBar()
         
     def UpdateButtons(self):