diff --git a/Common/Product/SharedProject/IdleManager.cs b/Common/Product/SharedProject/IdleManager.cs index c126a37a82..4a00918524 100644 --- a/Common/Product/SharedProject/IdleManager.cs +++ b/Common/Product/SharedProject/IdleManager.cs @@ -75,12 +75,16 @@ public int FDoIdle(uint grfidlef) { internal event EventHandler OnIdle { add { - EnsureInit(); - _onIdle += value; + _serviceProvider.GetUIThread().Invoke(() => { + EnsureInit(); + _onIdle += value; + }); } remove { - EnsureInit(); - _onIdle -= value; + _serviceProvider.GetUIThread().Invoke(() => { + EnsureInit(); + _onIdle -= value; + }); } }