diff --git a/ShareX.HelpersLib/ControlHider.cs b/ShareX.HelpersLib/ControlHider.cs index d650004a9..159c87bf8 100644 --- a/ShareX.HelpersLib/ControlHider.cs +++ b/ShareX.HelpersLib/ControlHider.cs @@ -48,14 +48,22 @@ public ControlHider(Control control, int autoHideTime) private void Timer_Tick(object sender, EventArgs e) { timer.Stop(); - Control.Visible = false; + + if (Control != null && !Control.IsDisposed) + { + Control.Visible = false; + } } public void Show() { - Control.Visible = true; - timer.Stop(); - timer.Start(); + if (Control != null && !Control.IsDisposed) + { + Control.Visible = true; + + timer.Stop(); + timer.Start(); + } } public void Dispose()