Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
NullReferenceException
Browse files Browse the repository at this point in the history
Try and catch it again
  • Loading branch information
Michael Higgins committed Feb 12, 2021
1 parent fe491ea commit 96f95c7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CenterTaskbar/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,18 @@ private void CancelPositionThread()
}
}

private void Restart(object sender, EventArgs e)
private async void Restart(object sender, EventArgs e)
{
CancelPositionThread();
Start();
try {
Start();
}
catch (NullReferenceException)
{
await Task.Delay(100);
Start();
}

}

private void ResetAll()
Expand Down

0 comments on commit 96f95c7

Please sign in to comment.