# HG changeset patch
# User Edouard Tisserant
# Date 1393538667 -3600
# Node ID bc14b43bd27f0f0de31eaab223b3cff3773c38cf
# Parent  bcd1e909076cfa27cea03e19544eaddc0d58dff6
Fixed non initialized timer causing exception in some rare cases (continued)

diff -r bcd1e909076c -r bc14b43bd27f 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)