diff --git a/Fluent/Services/KeyTipService.cs b/Fluent/Services/KeyTipService.cs index 70a9549df..4daee5ef3 100644 --- a/Fluent/Services/KeyTipService.cs +++ b/Fluent/Services/KeyTipService.cs @@ -137,13 +137,16 @@ public void Attach() /// public void Detach() { - if (!this.attached) + if (this.attached == false) { return; } this.attached = false; + // prevent delay show + this.timer.Stop(); + if (this.window != null) { this.window.PreviewKeyDown -= this.OnWindowKeyDown; @@ -342,9 +345,11 @@ private void ShowDelayed() private void Show() { - // Check whether the window is still active - // (it prevent keytips showing during Alt-Tab'ing) - if (this.window.IsActive == false) + // Check whether the window is + // - still present (prevents exceptions when window is closed by system commands) + // - still active (prevents keytips showing during Alt-Tab'ing) + if (this.window == null + || this.window.IsActive == false) { this.RestoreFocuses(); return;