Fixed non initialized timer causing exception in some rare cases (continued)
authorEdouard Tisserant
Thu, 27 Feb 2014 23:04:27 +0100
changeset 1396 bc14b43bd27f
parent 1395 bcd1e909076c
child 1397 21a2ea65cb30
Fixed non initialized timer causing exception in some rare cases (continued)
ProjectController.py
--- a/ProjectController.py	Thu Feb 27 10:45:06 2014 +0100
+++ b/ProjectController.py	Thu Feb 27 23:04:27 2014 +0100
@@ -1478,11 +1478,12 @@
         if self.AppFrame is not None:
             self.AppFrame.LogViewer.SetLogSource(connector)
         if connector is not None:
-            # Start the status Timer
-            self.StatusTimer.Start(milliseconds=500, oneShot=False)
+            if self.StatusTimer is not None:
+                # Start the status Timer
+                self.StatusTimer.Start(milliseconds=500, oneShot=False)
         else:
-            # Stop the status Timer
             if self.StatusTimer is not None:
+                # Stop the status Timer
                 self.StatusTimer.Stop()
             if update_status:
                 wx.CallAfter(self.UpdateMethodsFromPLCStatus)