don't crash on exit in cectray by preventing a new action from being started
[deb_libcec.git] / src / LibCecTray / ui / CECTray.cs
index 1b2897b1b4822bd5778037fc8b50582d3102ad03..8df996ecc374d6e786f3a0f526bcc2e3c472949c 100644 (file)
@@ -79,6 +79,7 @@ namespace LibCECTray.ui
 
     public void OnSessionEnding(object sender, SessionEndingEventArgs e)
     {
+      Controller.CECActions.SuppressUpdates = true;
       Controller.Close();
     }
 
@@ -128,8 +129,9 @@ namespace LibCECTray.ui
                 switch (pwr.Data)
                 {
                   case 0:
-                    OnWake();
-                    return;
+                    // do _not_ wake the pc when away mode is deactivated
+                    //OnWake();
+                    //return;
                   case 1:
                     OnSleep();
                     return;
@@ -174,6 +176,7 @@ namespace LibCECTray.ui
       Hide();
       if (disposing)
       {
+        Controller.CECActions.SuppressUpdates = true;
         Controller.Close();
       }
       if (disposing && (components != null))