CecTray: don't use lazy loading for the main controller, but pass the instance. bugzi...
[deb_libcec.git] / src / LibCecTray / Program.cs
index 32dc7af2b8675f7207703931933d17fe2183ef89..3ab9cf7317e7d5f6a9827768d720ecf4c5f1bdf1 100644 (file)
@@ -42,7 +42,15 @@ namespace LibCECTray
     private static CECTray _instance;
     public static CECTray Instance
     {
-      get { return _instance ?? (_instance = new CECTray()); }
+      get
+      {
+        if (_instance == null)
+        {
+          _instance = new CECTray();
+          _instance.Initialise();
+        }
+        return _instance;
+      }
     }
 
     [STAThread]