From: Lars Op den Kamp Date: Fri, 13 Dec 2013 10:23:36 +0000 (+0100) Subject: don't lock up on exit in cectray when receiving log messages while the window is... X-Git-Tag: upstream/2.2.0~1^2~3^2~9 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c46b7188dffb5b17f88de17615e4615a1f904877;p=deb_libcec.git don't lock up on exit in cectray when receiving log messages while the window is disposing --- diff --git a/src/LibCecTray/ui/CECTray.cs b/src/LibCecTray/ui/CECTray.cs index 8df996e..197ce32 100644 --- a/src/LibCecTray/ui/CECTray.cs +++ b/src/LibCecTray/ui/CECTray.cs @@ -174,6 +174,7 @@ namespace LibCECTray.ui protected override void Dispose(bool disposing) { Hide(); + SuppressLogUpdates = true; if (disposing) { Controller.CECActions.SuppressUpdates = true; @@ -311,6 +312,9 @@ namespace LibCECTray.ui delegate void UpdateLogCallback(); private void UpdateLog() { + if (SuppressLogUpdates) + return; + if (tbLog.InvokeRequired) { UpdateLogCallback d = UpdateLog; @@ -568,6 +572,7 @@ namespace LibCECTray.ui #endregion #region Class members + private bool SuppressLogUpdates = false; private ConfigTab _selectedTab = ConfigTab.Configuration; private string _log = string.Empty; private CECController _controller;